[Nottingham] Preventing console starting on embedded arm-linux
setup
Simon Huggins
huggie at earth.li
Thu Apr 1 19:15:39 BST 2004
Hi Nottingham,
On Thu, Apr 01, 2004 at 04:22:55PM +0100, Paul Sladen wrote:
> On Thu, 1 Apr 2004, Ant Allen wrote:
> $ ./my-application 2>&1 > /dev/ttyS0
> which first merges `stderr' and `stdout' and then pipes both to the serial
> port (check you have permission to write to the serial port).
Oh, no it doesn't:
[huggie at bounce ~]$ id error 2>&1 >file
id: error: No such user
[huggie at bounce ~]$ ls -l file
-rw-rw-r-- 1 huggie huggie 0 Apr 1 19:14 file
2>&1 sends stderr to whereever stdout is *currently* going at that point
in the commandline.
So you need >whereever and then 2>&1
e.g:
[huggie at bounce ~]$ rm file && id error >file 2>&1
[huggie at bounce ~]$ ls -l file
-rw-rw-r-- 1 huggie huggie 24 Apr 1 19:15 file
--
Simon [ huggie at earth.li ] *\ "Wind the frog!" \**
****** ]-+-+-+-+-+-+-+-+-[ **\ \*
****** [ Htag.pl 0.0.22 ] ***\ \
More information about the Nottingham
mailing list