Re: [shell] script's return status

Michael Shigorin <[email protected]>
Newsgroups gmane.linux.terminal-server.devel
Message-ID <[email protected]>
On Mon, Mar 31, 2008 at 12:13:10PM +0200, Oliver Grawert wrote:
> > > >> [ -e /selinux/enforce ] && /sbin/restorecon -R $TFTPDIR &> /dev/null
> > The difference is in exit code which can suddenly become
> > non-zero, and being the last line this determines the whole
> > script's execution status.
> did you miss the redirect at the end of the line ? there wont
> be any exit code from that

Even if "return code":

$ false && echo true; echo $?
1
$ false && echo true &> /dev/null; echo $?
1

I'm not speaking of stdout, it's the errorlevel :)
Folks get up, it's evening already :)

(the ">&/dev/null" analog for exit codes is "||:"
where ":" is shell builtin shortcut for "true")

-- 
 ---- WBR, Michael Shigorin <mike-u2l5PoMzF/[email protected]>
  ------ Linux.Kiev http://www.linux.kiev.ua/

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_____________________________________________________________________
Ltsp-developer mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help,   try #ltsp channel on irc.freenode.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.