Reputation: 225
now, I have a script using redirect command.
set filename1='/home/1.log'
echo "hello " >>& ${filename1}
Question:
Many thanks!
Upvotes: 1
Views: 119
Reputation: 189497
In the C shell, >&
and >>&
redirect both standard output and standard error to the designated file.
Note that Csh and derivatives are incompatible with Bourne shell; you should probably consider switching to a standard shell. These days, Bash and Zsh by and large support the same features as Tcsh, without sacrificing syntactic backwards compatibility with Bourne shell. See also http://www.perl.com/doc/FMTEYEWTK/versus/csh.whynot
Upvotes: 3