[ale] redirection stupids

Ed Cashin ecashin at noserose.net
Tue Oct 20 09:49:01 EDT 2009


On Mon, Oct 19, 2009 at 1:11 PM, Jim Kinney <jim.kinney at gmail.com> wrote:
> bingo. parens are my friend!
>
> final form:
>
> (time psql<input.sql >outpustfromsql) 2>timeout

I notice braces seem to do the same, and they don't use a subshell.
This is kind of weird to me.

ecashin at meili:~$ { bash -c 'time echo hi < /dev/null > /tmp/out 2>
/tmp/err'; } 2> /tmp/err2
ecashin at meili:~$ cat /tmp/err2

real    0m0.000s
user    0m0.000s
sys     0m0.000s
ecashin at meili:~$ bash -c 'time echo hi < /dev/null > /tmp/out 2> /tmp/err'

real    0m0.000s
user    0m0.000s
sys     0m0.000s
ecashin at meili:~$


-- 
  Ed Cashin <ecashin at noserose.net>
  http://noserose.net/e/
  http://www.coraid.com/


More information about the Ale mailing list