thobbs wrote:
Assuming those commands write something to stdout (part of what shows up in the terminal when you run a command, along with stderr), you can just capture that directly:
Code:
CN=`zisview -z ComputerName`
DN=`zisview -z ObjectDN`
$? gives you the "exit status" of a program, so-to-speak. Typically, 0 is returned if everything goes well, and anything else indicates an error (sometimes specific values are tied to specific types of errors). Since you are getting 1 back, it might not be executing correctly.
Tried that this morning with no luck. I used both ` and ' to make sure I wasn't missing anything
Enclosed with ` it returned the commands when I echo'ed it
Enclosed with ' it returned an empty string when echo'ed
FYI: I am using Novell ZENworks as the bash environment
Thanks for the help