The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
the shell not pause when execute read command neruppu Shell Programming and Scripting 14 07-06-2008 07:34 PM
shell script to execute user command redtiger Shell Programming and Scripting 1 04-30-2008 06:53 PM
execute a command silently or quietly within a shell lumix Shell Programming and Scripting 4 12-15-2007 03:10 PM
execute shell command in perlscript amitrajvarma Shell Programming and Scripting 0 11-27-2007 02:49 AM
Urgent!! How to write a shell program to execute command to access internet? firebirdonfire UNIX for Dummies Questions & Answers 2 04-26-2001 11:16 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-27-2009
Deepakkumard Deepakkumard is offline
Registered User
  
 

Join Date: May 2009
Posts: 2
Question Cann ot execute a shell command

Hi ,

I am new to UNIX and Shell scripting . I am not able to execute a shell file . I try to do it using the below command.

./start.sh

but it shows an error that 'cannot execute ' what might be the reason for this? pls help me to resolve it.
  #2 (permalink)  
Old 05-27-2009
colemar colemar is offline
Registered User
  
 

Join Date: Apr 2009
Location: Trento, Italy
Posts: 116
Quote:
Originally Posted by Deepakkumard View Post
./start.sh

but it shows an error that 'cannot execute '
Sounds like the file start.sh is missing the x mode bits.

Code:
chmod u+x start.sh
Also you should explicitly state in the first line of the script what is the interpreter program that should be invoked to run the rest of the script.
For a shell script one of the following should do:
#!/bin/sh
#!/bin/ksh
#!/bin/bash
#!/bin/csh
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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



All times are GMT -4. The time now is 04:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0