TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:751] Problem running scripts - Need Advice



Bob Nolte wrote:
> 
> I hope someone can give me a clue as to what to do to get my RH5.0 box
> running scripts correctly. I'm presently taking the Unix I course at the
> tech college.
> 
> 2 Problems:
> 
> 1.    I can't run any script without running in the current environment, ie.
>         .  scriptname. I get the error   bash: [script]: command not found
>         unless I do the dot thing.

It sounds like its not finding the script within your path.  You would
need to add it to your .profile, .login path statement.
$PATH = /bin:/usr/bin:/<location of script>

Try using:  echo $PATH, and see if the script is located within the
directories being scanned for executables.  If it is and you're still
having problems than You might also need to insure that it has executabe
permissions.  If you're the only person needing to run it do:  chmod o+x
<scriptname>, or if anyone can: chmod a+x <scriptname>, or just selected
users: chmod u+x <scriptname>


> 
> 2.    When I try to use exit in an if statement, it exits completely and
> logs
>         me out.

Not sure. 

> 
> The scripts run fine in a telnet session at the votech which is also running
> Linux and the Bash shell. Any help would be appreciated.
> 
> Bob Nolte

HTH
Brian Seppanen
seppanen@pconline.com