Picking a MAC address for a FreedomBox
Posted Jan 22, 2013 1:04 UTC (Tue) by
ABCD (subscriber, #53650)
In reply to:
Picking a MAC address for a FreedomBox by dlang
Parent article:
Picking a MAC address for a FreedomBox
No it isn't. command 2>&1 >/dev/null first copies fd 1 to fd 2 (thus sending stderr to where stdout is currently going), then sets fd 1 (stdout) to /dev/null. The standard "show me nothing" line is command >/dev/null 2>&1, which sets fd 1 to /dev/null, then copies fd 1 to fd 2.
To see the difference, compare the following:
$ to_stderr() { echo "$@" >&2; }
$ to_stderr test 2>&1 >/dev/null
test
$ to_stderr test >/dev/null 2>&1
(
Log in to post comments)