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
Put a \ in front of special characters in SED tugger Shell Programming and Scripting 9 10-17-2007 07:12 AM
Running exe's from front end Sinbad High Level Programming 0 09-13-2004 09:33 AM
Front end on Unix shibz UNIX for Advanced & Expert Users 4 11-17-2001 12:37 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-09-2006
rig123 rig123 is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 1
run script with ./ in front of name

on unix AIX5.3, we run a scripts by entering the
script name on the command line and sometimes
we get a not found error and then we put ./ in front on the name
and it runs.
Why?
  #2 (permalink)  
Old 03-09-2006
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
check your '$PATH' environment variable - it probably doesn't have '.'
  #3 (permalink)  
Old 03-09-2006
qfwfq qfwfq is offline
Registered User
  
 

Join Date: Feb 2005
Location: Canada
Posts: 133
You can also try:
Code:
sh yourprog
but as VGERSH99 said, you should add that directory to the PATH variable.
  #4 (permalink)  
Old 03-10-2006
rajiv25 rajiv25 is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 2
rig,
when u run script by just entering the script name, the shell finds the script in paths/location as defined in the $PATH variable.

The reason why the script failed is because your current directory is not defined in the PATh varibale. But when you run script as ./script_name then the shell gets the location of the script as ' . ' ( i.e. yuor current directory )
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 09:23 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