BASh help
Andy Green
andy at warmcat.com
Thu Aug 30 15:22:45 UTC 2007
Somebody in the thread at some point said:
> does an 'ls' on each one. The problem is, I /want/ the script to NOT
> find those files, i.e., those files shouldn't be there. That part
> works, but I can't dump the output of that into a text file.
It's because the error text is going out on stderr, or file handle 2.
You can redirect just file handle 2 stuff (and not the normal stdout
stuff) like this
ls nosuchfile 2>testfile.txt
-Andy
More information about the fedora-list
mailing list