nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

running .sh script linux

This is a discussion on running .sh script linux within the Shell scripting forums, part of the Development/Scripting category; Hi all, I have a script called start.sh, how do I run this shell script? Sorry I am new and ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 06-16-2006, 05:27 PM
Member
User
 
Join Date: Jun 2005
Posts: 78
Rep Power: 0
jerry
Default running .sh script linux

Hi all,

I have a script called start.sh, how do I run this shell script? Sorry I am new and don't know much about shell script.



I read somewhere i need to set up some permission before i run the script. Please help

regards

Jo
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-17-2006, 02:45 PM
Member
User
 
Join Date: Jun 2005
Posts: 78
Rep Power: 0
jerry
Default

never mind guys I found the solution. First I type the chmod command to change file access permissions to executable
Code:
chmod +x script.sh
To execute script I has to type the command (any one of the following will do):
Code:
./script.sh
or
Code:
bash script.sh
or try this
Code:
sh script.sh
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Setting up RAID 1 mirroring on a running remote Linux system sweta Getting started tutorials 9 09-22-2008 06:04 PM
Getting Squid 3.0 up and running Mic Linux software 4 05-18-2008 04:56 PM
List Services Linux Running raj Getting started tutorials 4 03-28-2008 04:55 PM
start up and stop the running script mala_un Shell scripting 9 07-26-2006 08:10 AM
required help for running a shell script from browser vaishalichitale Shell scripting 1 06-27-2006 05:53 PM


All times are GMT +5.5. The time now is 08:58 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36