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
I have 2 files and I want to print the records which are common to both.
What are script files?
How to print the first array element?
What is difference between bash and shell?
How does ls command work?
What is the use of echo in shell script?
Suppose you execute a command using exec, what will be the status of your current process in the shell?
What is the use of a shebang line?
Is shell a scripting language?
What are "c" and "b" permission fields of a file?
What's the difference between scripting and coding?
What is shell and terminal?
What is the way to do multilevel if-else's in shell scripting?
Why should we use shell scripts?
How to print pid of the current shell?