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