Jan Engelhardt wrote:
On Tuesday 2008-04-22 16:08, Dirk Moolman wrote:
I tried adding 2>/dev/null, but I still get the message. The syntax I used was:
NUMFILES=`ls mhc_er* | wc -l` 2>/dev/null
What should my syntax be for this line ? I would like to change it on this line inside the script, and not outside the script (I don't want to run ./myscript 2>/dev/null)
You'd rather want to use find . -name 'mhc_er*' | wc -l
But that's not the same. Your statement would also count files in subdirectories, whereas his only in the local directory. To use find to the same effect, one would need to add -maxdepth N to the options; N being 0 or 1, I'd need to read the find man page for that tidbit but am too lazy... ;-) Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org