Re: Re: Menu on bootup?

Bruce Clement <[email protected]> Mon, 17 Oct 2011 20:28:08 +1300
Newsgroups gmane.org.user-groups.linux.new-zealand.general
Message-ID <CAAPkoP=7mWckoBy4z3jpwvdS3MStWFhk0s2PeJxyRPe3kyrGPQ@mail.gmail.com>
On Mon, Oct 17, 2011 at 8:04 PM, Nevyn <[email protected]> wrote:

>
> exec </dev/console >/dev/console 2>&1
> [...]
>


> I've never really understood file
> descriptors. Is anyone able to explain that first line to me?
>

"2>&1" = close file descriptor 2 & make it an alias of file descriptor 1

Which doesn't really help unless you know that 2 is STDERR (Standard Error
stream) and 1 is STDOUT (Standard Output stream)

So this just says send error messages to the output stream, not to the
console (Unless the console happens to be the destination of the output
stream).

HTH

-- 
Bruce Clement

Home:    http://www.clement.co.nz/
Twitter:    http://twitter.com/Bruce_Clement
Directory: http://www.searchme.co.nz/

"Before attempting to create something new, it is vital to have a good
appreciation of everything that already exists in this field." Mikhail
Kalashnikov
_______________________________________________
NZLUG mailing list [email protected]
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug