Linux sys vars?
Kevin Fries
kfries6 at gmail.com
Thu May 12 13:49:41 MST 2011
On 05/12/2011 02:34 PM, keith smith wrote:
> What is the number 1 and 2? Is there others?
>
These are not variables, they are file handles.
0 = Standard In
1 = Standard Out
2 = Standard Error
If you want all errors to be sent to Standard Out instead of Standard
In, append your command with 2>&1. This way, you can pipe the output
through something like tee, more, less, or redirected to a file.
side note, if you want both stdout and stderr both redirected to a file,
say /tmp/output.txt, you can do that with a command &>/tmp/output.txt
Hope this helps
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20110512/7ccb33e1/attachment.html>
More information about the PLUG-discuss
mailing list