There is a way to run a unix script and see at the command line what actions it is doing. From what I remember to get this you had to put something like -X after executing the script name ie; > test.sh -X.
Thanks for replying, not quite. I was once shown a way to run a script that was doing a rsh to another box, and to see what action the script was doing I run the script at the command line and Im sure I put something like -X after the script name, then while the scipt executes below the command line you could see the scipt action, like it doing its rsh to the box and so forth, so forth. It was a sinple way to see where my scipt is error'ing.
Haven't heard of your particular example with "-X", but I know two alternate methods. One is to use the tee command and pipe it to a file, then you could use tail in another window and watch the output (command |tee>out.file). Another way is to use the script command to keep a record of everything that occurs on your screen. Not sure if this helps you.
If your script is a ksh script, try adding 'set -x' at the begiging of the script. You will see the script echoing its execution steps to the screen as it goes.
Your milage may vary with other shell [shell scripts] - 'man ksh'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.