How can I Debug a shell scripts and Perl scripting??
or How do you debug a shell scripting and perl scripting (
at the compile time error or run
time error) in Unix environment ?
Answers were Sorted based on User's Feedback
Answer / hema
Using sh -x script argument you can debug(-x option).
Bash shell offers debugging options which can be turn on or
off using
set command.
=> set -x : Display commands and their arguments as they are
executed.
=> set -v : Display shell input lines as they are read.
Hope this answers your question.
Is This Answer Correct ? | 12 Yes | 1 No |
Answer / manas
We can debug only by $? which contains the returned value
of last executed command.
If $? contains 0 value then command run successfully other
wise error occured while running command
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / sushil
In addition to Hema's ans :
We can have some $? statement, echo statements embadded in
script.
In pern we can use -w option to print the warning or erros
generated during compilation, can make use os strict to force
to use good programming practice...
Is This Answer Correct ? | 0 Yes | 1 No |
What does echo mean in scripting?
Explain about sourcing commands?
How to print some text on to the screen?
How to group the commands in shell scripting?
How do I open the shell prompt?
Is shell scripting a programming language?
Is shell scripting useful?
What are the advantages of shell script?
what do u mean by $#,$* in unix programming?
if i have 2 files file1 and file2.... file1 contains 2 columns like b a 11 aa 12 as 13 ad 15 ag 11 ar 13 ah 15 ak file2 contains b c 10 ds 11 at 15 gh 15 jk 13 iu 11 fg 13 yy can any 1 give me the program to display in this way? a b c aa 11 at ar 11 fg ad 13 iu ah 13 yy ag 15 gh ak 15 jk
What are the four fundamental components of every file system on linux?
what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?