SCOUG-HELP Mailing List Archives
Return to [ 26 |
May |
2001 ]
<< Previous Message <<
>> Next Message >>
=====================================================
If you are responding to someone asking for help who
may not be a member of this list, be sure to use the
REPLY TO ALL feature of your email program.
=====================================================
In <3B0F5B48.5EDA@peterskye.com>, on 05/26/01
at 12:29 AM, Peter Skye said:
>Anybody have any info on this? Similarly, anybody know what "errorlevel"
>is returned to a subsequent "if errorlevel ..." statement when using &,
>&& and || unconditional/conditional command processing?
cmd.exe works like unix and the returned errorlevel is the errorlevel
returned by the last command in the pipe. The errorlevels are not passed.
If an upstream routine crashes, in unix at least, the pipe will closed
with error and the downstream routine will fail with the ubiquitous broken
pipe messsage. Other than that, the down stream routines usually have no
clue what's upstream which is part of the beauty of pipes.
What you want to do is easily handled in unix, the shells are infinitely
more capable than cmd.exe. If you really need to check failure you are
going to have to rewrite as:
cmd1 >tmpfile1
if errorlevel
cmd2
FWIW, cmdref.inf one of the worst of the IBM documents. Try finding a
definition of what >& or & does.
HTH,
Steven
--
----------------------------------------------------------------
"Steven Levine" MR2/ICE 2.28a #10183 Warp4/FP11
www.scoug.com irc.webbnet.org #scoug (Wed 7pm PST)
----------------------------------------------------------------
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-help".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 26 |
May |
2001 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|