The UNIX and Linux Forums  


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
Parent/child Korn shell script help sasaliasim Shell Programming and Scripting 1 05-06-2008 06:09 PM
Include PERL script with in the unix shell script ganapati UNIX for Dummies Questions & Answers 1 04-29-2008 01:18 PM
Using Awk in shell script to extract an index of a substring from a parent string sandeepms17 Shell Programming and Scripting 2 11-07-2007 07:44 AM
How to call a perl script from a shell script anumkoshy Shell Programming and Scripting 2 08-30-2007 05:23 AM
returning to the parent shell after invoking a script within a script gurukottur Shell Programming and Scripting 5 09-26-2006 08:05 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-15-2007
hifake hifake is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 10
Quote:
Originally Posted by porter View Post
What shell are you running normally?

What is it's complete path?

Try using that in the "#!....." first line.

Then switch to sh, by typing "sh", and then try and run the script.
It is bash shell.
But when I use "#!..." in the first line, it throws an error...always

Am not able to find the reason.

I tried #!/bin/sh and #!/bin/ksh

It doesn't work. What else do i need to try?
  #2 (permalink)  
Old 08-15-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Hey, it's just a wild guess,...

try

#!/bin/bash
  #3 (permalink)  
Old 08-15-2007
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,799
Try to exec the shell and pass the name of the script as an argument to the shell (not exec the script directly).
  #4 (permalink)  
Old 08-15-2007
hifake hifake is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 10
Quote:
Originally Posted by Neo View Post
Try to exec the shell and pass the name of the script as an argument to the shell (not exec the script directly).
Hi Neo,
Can you tell me how to do this?
  #5 (permalink)  
Old 08-15-2007
hifake hifake is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 10
Quote:
Originally Posted by porter View Post
Hey, it's just a wild guess,...

try

#!/bin/bash
Did not work
Closed Thread

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 11:40 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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