In bash I get the stdout of a subshell block and assign it to a varaiable like:
$ VAL="$(ls)"
How can this be done in tcsh?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use backticks to get the output and use
setto assign it to a variableexamples:
to clear the variable use
unset valSee http://www.grymoire.com/Unix/Csh.html for more examples and information on csh / tcsh