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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Executing a script through GUI snvijaysankar UNIX for Dummies Questions & Answers 2 06-02-2008 01:49 AM
[AIX] executing script piooooter UNIX for Dummies Questions & Answers 1 05-25-2006 09:53 PM
RSH use for executing a script frustrated1 Shell Programming and Scripting 6 10-02-2003 05:24 AM
Executing ksh script from cgi hodges Shell Programming and Scripting 1 05-27-2003 07:57 AM
Executing Ps in script Claude Shell Programming and Scripting 1 11-21-2001 10:01 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-03-2005
Registered User
 

Join Date: May 2005
Posts: 190
executing script

Hello ;
I have a script myscript.sh. If I type at prompt
myscript.sh
I will receive
ksh: myscript.sh: not found
but if I type
./myscript.sh
it works .
What should I do to be able to run myscript just typing
myscript.sh
Many thanks before.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-03-2005
Registered User
 

Join Date: May 2005
Posts: 46
Thumbs up execute the script

Hello

U r not able to execute the script as the script is in ur current directory and ur current directory is not set in the $PATH variable .

At ur prompt type :-

PATH=$PATH:.;

and then execute the script .

2) answer to 2nd question

./myscript will execute the script in ur current directory overriding the PATH variable .

Cheers
Rahul
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0