What are the different methods available to run a shell
script?

Answers were Sorted based on User's Feedback



What are the different methods available to run a shell script?..

Answer / keerthi

3 ways

1. sh scriptname.sh

2. If the script has execute permission -

./script.sh


3. If the script has execute permission and is
stored in the directory listed in PATH ----

script.sh or .script.sh

Is This Answer Correct ?    13 Yes 0 No

What are the different methods available to run a shell script?..

Answer / sujitha

3 ways

1. Execute Shell Script using File name

$./scriptfile { The changes in the script effect to current
terminal }

2 . Execute Shell Script by specifying the interpreter

$sh scriptfile

3. Execute Shell script using ../ (dot space dot slash)

$. ./scriptfile { The changes in the script effect to total
system }

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

How do I run a .sh file?

1 Answers  


What is k shell?

1 Answers  


How to handle the delimiter unit seperator in Unix

2 Answers  


What is bourne shell scripting?

1 Answers  


How will you find the 99th line of a file using only tail and head command?

1 Answers  


What is the first line in a shell script?

1 Answers  


What is the difference between a 'thread' and a 'process'?

3 Answers  


What is shell company all about?

1 Answers  


Explain about login shell?

1 Answers  


Explain about echo command?

1 Answers  


how to search for vowels a,e,i,o,u appearing in the same sequence in a file

4 Answers   Amazon,


How to enable the shell to know what program should be run to interpret the script?

3 Answers  


Categories