Verbose Mode
Have you ever wished you could follow the logic of your teenager to better understand some conclusion he or she has drawn? (If you are a teenager, you can reverse the roles. You might wonder about the series of logic steps taken by your parents to arrive at a conclusion.) The next Korn Shell debugging option does just that. It provides the bread crumbs to follow through the dark woods of your script's execution.
One of the ksh options for debugging is the verbose option. It displays each shell command before it executes it.
The verbose shell option can be turned on in several ways. You can start a new shell with the -v option using ksh -v. You can put a -v at the end of the #! line at the beginning of your script, or you can type ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access