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

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


Please Help Members By Posting Answers For Below Questions

How are shells born?

1017


Differentiate between ‘ and ” quotes.

1246


Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

1580


Where is bash history?

986


Is shell scripting a language?

1094


How does ls command work?

1074


What is $1 in shell scripting?

1084


State the advantages of shell scripting?

1094


Can you write a script to portray how set –x works?

1040


How to find all the files modified in less than 3 days and save the record in a text file?

1100


What is sudo command?

1103


How do I stop script errors?

1200


What is bash eval?

1056


Is powershell a bash?

1122


How to print all array elements and their respective indexes?

1012