What is the difference between running a script as
./scriptname.sh and sh scriptname.sh
Answer / 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 |
What is use of "cut" command?
How do I edit a .sh file?
What is a shell? · Types of shell · what is shell scripting?
In a file , how to retrieve the lines which are the multiples of 50 ? like 50,100,150th lines etc.
What is a beat in a script?
What is shell chemistry?
How do you read arguments in a shell program - $1, $2 ..?
How do I run a bin bash script?
Is it possible to substitute "ls" command in the place of "echo" command?
How to make userdefined variables to available for all other shells?
how do you write sql queries using shell script for eg:- we have databae table like EMPNO,ENAME,SAL,DEPTNO columns in EMP table how you display EMPNO,SAL FIELDS from emp in SHELL SCRIPT please explain with an example
How to declare functions in unix shell script?