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 shell a part of kernel?
How will you schedule a job that will run every month last day?(some months have 30 days,some 31 days,28,29 days)
Why is it called a shell?
What is scripting autism?
write a shell script to identify the given string is palindrome or not?
17 Answers CTS, HP, IBM, InfoEst, Wipro,
What is the syntax of while loop in shell scripting?
What is scripting used for?
Create a bash shell script that reads in a number from the user. If the number is 1, print out the date. If the number is 2, list the files in the current directory. If the number is 3, print out who is currently logged onto the system. If the number is anything else, print out an error message and exit. Name this script "various.sh"
How do I run a shell script in powershell?
What is a shell script? Can you name some of its advantages?
What is shell chemistry?
What is the difference between bash and shell?