I'd like to write a bit of code that looks like this:
while ( `ls -1 ${JOB_PREFIX}_${job_counter}_*.out | wc -l` > 0 )
echo "Do something here."
end
But every time there is no ls -1 ${JOB_PREFIX}_${job_counter}*.csh
it gives an annoying ls: No match.
Is it possible to suppress this error message but still pipe STDOUT
to wc
? I went through the existing questions on this but most of the answers are either not working on csh
or tries to combine STDOUT
and STDERR
with |&
which I do not want.