I think I am missing something terribly stupid, please correct me.
root@fdas:~# mount /dev/sdd1 /b 2>&1 > /tmp/test
mount: you must specify the filesystem type
root@fdas:~# cat /tmp/test
root@fdas:~# mount /dev/sdd1 /b > test
mount: you must specify the filesystem type
root@fdas:~# cat test
root@fdas:~#
I simply need to capture that one line of output…Thank you in advance
It appears that in standard shell (not bash/csh) you need to tell it where to redirect
stdoutfirst and redirectstderrthen, so you just need to swap your redirects:In CSH you can use
&as Shiplu suggested:In BASH
&syntax is different:BASH supports CSH
&syntax too, but it is NOT recommended (in man)