Javatpoint Logo

91-9990449935

 0120-4256464

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.





Latest 4 Tutorials on JavaTpoint