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
What are the different variables present in linux shell?
Can you write a script to portray how set –x works?
What is the use of break command?
What is sudo command?
Is shell scripting a language?
shell script for reverse the string
Where are cowrie shells found?
What is the use of .sh file?
What is scripting autism?
Is it possible to substitute "ls" command in the place of "echo" command?
How do you create a shortcut in linux?
How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?
What is bash coding?
What is shell application?
What is wc in shell script?