What is the difference between running a script as
./scriptname.sh and sh scriptname.sh
Answer Posted / vidhu
while running the script using this "./" script run from
curent location we have to give executable permision to the
script file
By default file contains 644 permissions there is no
execute permission while running it shows error
use `chmod` to give execute permission and run
where as "sh" it runs the script with the help of default
shell
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
How are shells born?
Differentiate between ‘ and ” quotes.
Write a command sequence to find all the files modified in less than 2 days and print the record count of each.
Where is bash history?
Is shell scripting a language?
How does ls command work?
What is $1 in shell scripting?
State the advantages of shell scripting?
Can you write a script to portray how set –x works?
How to find all the files modified in less than 3 days and save the record in a text file?
What is sudo command?
How do I stop script errors?
What is bash eval?
Is powershell a bash?
How to print all array elements and their respective indexes?