What are the different methods available to run a shell
script?
Answers were Sorted based on User's Feedback
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 |
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 |
Is powershell a language?
What are the different types of variables used in shell script?
What are the different kinds of loops available in shell script?
What are different types of shell?
There is a record with fields namely name,roll no.,salary,grade etc.Now,write a script to create a file with multiple records have same combination of fields but with unique roll numbers.The script should work for different names in the input file.
What is the use of script interpreter in shell scripting?
How to get the 3rd element/column from each line from a file?
Why do we write bin bash in shell scripts?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?
What are the different communication commands available in the shell?
How do I open the shell in cmd?
How shell works?