Kleines Script-Problem

Jan-Benedict Glaw jbglaw at lug-owl.de
Wed Sep 25 16:38:02 CEST 2002


On Wed, 2002-09-25 09:27:50 +0200, Florian Lohoff <flo at rfc822.org>
wrote in message <20020925072750.GA24723 at paradigm.rfc822.org>:
> On Tue, Sep 24, 2002 at 08:59:46PM +0200, Jan-Benedict Glaw wrote:
> > #/bin/sh
> > some_command 2>&1 | tee logfile
> > if [ $? -ne 0 ]; then
> > 	echo Tot und Teufel
> > fi
> 
> command | ( echo $? >$TMPFILE ; tee logfile ) ?

Nope:

jbglaw at min:~/xxxx$ cat temp.sh 
#!/bin/sh

false > logfile | ( echo $? > hallo; tee logfile )

jbglaw at min:~/xxxx$ ./temp.sh 
jbglaw at min:~/xxxx$ cat hallo   
0

MfG, JBG

-- 
   - Eine Freie Meinung in einem Freien Kopf für
   - einen Freien Staat voll Freier Bürger
   						Gegen Zensur im Internet
Jan-Benedict Glaw   .   jbglaw at lug-owl.de   .   +49-172-7608481
	 -- New APT-Proxy written in shell script --
	   http://lug-owl.de/~jbglaw/software/ap2/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20020925/76663145/attachment.sig>


More information about the Linux mailing list