Wednesday, June 11, 2008

Different ways of running a Shell Script

1. Executing the Shell Script file as a command in the Shell Prompt
vjsujay@linuxdemon$sample.sh

2. Executing the Shell Script file using specified Shell
vjsujay@linuxdemon$bash sample.sh

3. Executing the Shell Script file in the current Shell
vjsujay@linuxdemon$source sample.sh
or
vjsujay@linuxdemon$. sample.sh

4. Executing the Shell Script file using exec command
vjsujay@linuxdemon$ exec sample.sh

No comments: