Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AIX korn shell debugging

Status
Not open for further replies.

WiccaChic

Technical User
Jan 21, 2004
179
US
Is there a way to debug ksh scripts? I am thinking I saw someone do this long ago, and you could see each command before it executed, but I dont know how to do it.
 
set -x in the script will show you the lines being executed, if that's any help. Judicious use of echo for variables etc will also help. HTH.
 
Additionally,

To do it without editing the script, you can use the -x commandline flag:

ksh -x scriptname

or if you prefer the -o option style inside the script, it can be set with:

set -o xtrace



Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top