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 > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
executing uname through shell script HIMANI UNIX for Dummies Questions & Answers 3 10-11-2007 06:47 AM
executing a SQL query in shell script lijju.mathew Shell Programming and Scripting 1 05-17-2007 11:29 AM
Executing a Shell Script igandu UNIX for Dummies Questions & Answers 4 08-17-2006 10:29 AM
executing shell script from the cron abNORMal HP-UX 2 06-15-2006 02:54 PM
Executing a SQL query from a shell script 98_1LE UNIX for Dummies Questions & Answers 3 03-23-2002 03:29 AM

Closed Thread
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 08-19-2004
dreams5617 dreams5617 is offline
Registered User
  
 

Join Date: Jul 2004
Location: USA
Posts: 52
Arrow Shell script is not executing

Hi,

I am trying to execute the below shell script: script name(ss1).

ss1 was given permission - 744 before executing.

name: ss1
#ss1
#usage:ss1
ls
who
pwd
:wq
I tried to execute $ss1 (Enter)
Its not executing.... It says that ss1 is not found:

echo $SHELL. The o/put i got is /sbin/sh.
What should i have to do inorder the shell script to be executing.

Thanks
  #2 (permalink)  
Old 08-19-2004
Tux Tux is offline
Registered User
  
 

Join Date: May 2003
Location: UK, Up North
Posts: 113
$ ./ss1
  #3 (permalink)  
Old 08-19-2004
dreams5617 dreams5617 is offline
Registered User
  
 

Join Date: Jul 2004
Location: USA
Posts: 52
ss1 is in the / root directory. Even though i tried with ./ss1 it is not working it still says ss1: is not found
  #4 (permalink)  
Old 08-19-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,100
First of all, please do not crosspost your question like that. Crossposting is against the rules.

The root directory is not a great location for your script. But to run it, use the full path:
/ss1

The first line of a shell script should be something like:
#! /usr/bin/sh
or whatever shell you are using. Do you really have a line with ":wq" in your script? Or a line "name: ss1"? That would not make sense. I can't tell what lines you are claiming to have in your script.
  #5 (permalink)  
Old 08-19-2004
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Also, it looks as if you're doing this whilst being logged in as root as your shell is /sbin/sh

I would strongly discourage you being logged in as root uneccessarily, especially if you are new to UNIX, as a wayward moment on the command line can lead to a completely useless system.

Cheers
ZB
  #6 (permalink)  
Old 08-20-2004
PaulC PaulC is offline
Registered User
  
 

Join Date: Mar 2004
Location: Esher, Surrey, England.
Posts: 31
Have you done a "chmod +x <filename>" ?

I'm not sure that the file would be executable with chmod 744... (I'm sure someone will tell me if I'm wrong )


(edit)
Actually on second thoughts, the error message would be along the lines of "file not executable" if that was the case...

Sponsored Links
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 08:05 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