I am trying to translate the following cshell command to bash
but I am not sure what it does and how I can translate it
to bash.
./runall |& fold -w 80 |& tee ${log_file}
Any help appreciated,
Ted
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.
foo |& barexecutesfoowith its stdout and stderr piped to the stdin ofbar.The bash equivalent is
foo 2>&1 | bar.So for your command, it should be (untested):
(The curly braces in
${log_file}aren’t really necessary, but they’re harmless, and some consider them to be a good idea; that’s true for both csh and bash.)