Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between running a script as
./scriptname.sh and sh scriptname.sh



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

Post New Answer

More Shell Script Interview Questions

In which variable prompt value is stored?

2 Answers  


Explain about "s" permission bit in a file?

0 Answers  


c program which accept one argument as a directory name and prints all the file name along with its inode number and total count of the file in directory

1 Answers  


How to get the first line from a file using just the terminal?

0 Answers  


What does $@ mean bash?

0 Answers  


what is the difference between cmp and diff commands

2 Answers   Amazon, CTS,


How do we delete all blank lines in a file?

0 Answers  


What is shell terminal?

0 Answers  


Suppose you execute a command using exec, what will be the status of your current process in the shell?

0 Answers  


What is shell and terminal?

0 Answers  


What is the difference between a shell variable that is exported and the one that is not exported?

6 Answers  


how to get part of string variable with echo command only?

0 Answers  


Categories