-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2006-10-15 at 22:52 +0530, Duff Mckagan wrote:
The Sunday 2006-10-15 at 11:53 -0000, Duff Mckagan wrote:
echo $i >> err
...
No, it should not. You are redirecting standard output only, not standard error output.
You mean to say that with the following script, I am redirecting Standard Output only?
No, with the _above_ script (please notice standard email quoting practices).
i=a echo `i` 2>> err
2> is used for redirecting errors, right?
Yes. Notice that the ">>" means append to file, while ">" will create the file. Therefore, the "2>> err" translate as append error output to file "err". If you intend to redirect both normal output and error output, you use "&>2" instead. See "man bash", paragraph REDIRECTION. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFMo3mtTMYHG2NR9URAnoHAJ9d9CnJoqrhF1U9BN3gkBWSRex/HACfRzKv hOfi7USWoKzXtm7o3os9erA= =QeoI -----END PGP SIGNATURE-----