Re: [PLUG] running shell scripts

Kyle R . Burton on 2002年12月27日 16:39:05 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] running shell scripts


> I'm trying to run a shell script but it says
> 
> [root@localhost sm56]# srcprep
> bash: srcprep: command not found
This is usualy caused by bash not being able to find an executable with
that name in the $PATH. There are a few things you can do.
Run it explicitly with sh:
[root@localhost sm56]# sh srcprep
Run it by pathing it localy:
[root@localhost sm56]# ./srcprep
Run it by pathing it absolutely:
[root@localhost sm56]# /root/sm56/srcprep
Add /root/sm56 to your PATH first:
for root):
[root@localhost sm56]# export PATH="$PATH:/root/sm56"
[root@localhost sm56]# srcprep
or:
[root@localhost sm56]# PATH="$PATH:/root/sm56" srcprep
Lastly, add '.' to your PATH first (I don't recommend this, especially so 
for root):
[root@localhost sm56]# export PATH="$PATH:."
[root@localhost sm56]# srcprep
hth,
Kyle
-- 
------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
 -- Christmas Humphreys
mortis@voicenet.com http://www.voicenet.com/~mortis
------------------------------------------------------------------------------
_________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion -- http://lists.netisland.net/mailman/listinfo/plug



AltStyle によって変換されたページ (->オリジナル) /