Go 2 Linux/Unix World !!
Tips n Tricks of Linux/Unix/Solaris.........
Pages
Home
Popular Linux Distribution
Useful Linux Applications
Useful Linux-Links
Contact Me
Tuesday, December 28, 2010
How to debug a bash script in Linux
To debug a bash script, you need to run a shell script with
-x
option from the command line itself:
bash -x scriptname
or
bash -xv scriptname
You can also modify
shebang
line to run an entire script in debugging mode.
#!/bin/bash -x
echo
"Hello
${USER}
"
echo
"Today is $(date)"
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment