For Programmers: Free Programming Magazines  


Home > Archive > Tcl > September 2006 > Re: Getting the return value of a command line program









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Getting the return value of a command line program
Rufus V. Smith

2006-09-27, 7:04 pm


"Mark Okamura" <mark.okamura@ieee.org> wrote in message
news:1152811740.142985.67690@b28g2000cwb.googlegroups.com...
> Thank you gentlemen. I did not realize that "catching" close would
> return the program's return value. Tcl makes these tasks easy (with
> the group's help)!
>
> Mark
>


Yes, be glad.

We were doing scripting in awk, and the only way
we could get the return status of an executed program
was to execute a batch file, which in turn executed the
program, then echoed the %errorlevel% to the output, which
was then reparsed by the calling function, which grabbed
the last line of output (the echoed errorlevel).


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com