Javatpoint Logo
Javatpoint Logo

Troubleshooting a shell script

There is one more way other than script execution to run a script in a different shell. Type bash with the name of the script as parameter.

Syntax:

Example:

bash exm

Linux Troubleshooting a script 1

Look at the above snapshot, it displays the exm script content with bash command.

Linux Troubleshooting a script 2

Look at the above snapshot, this is the exm script we have written.

By expanding bash command with -x, shell allows us to see commands that the shell is executing.

Linux Troubleshooting a script 3

Look at the above snapshot, with command bash -x, we can see the shell expansion.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA