Imported from ../bash-2.0.tar.gz.
This commit is contained in:
parent
726f63884d
commit
ccc6cda312
502 changed files with 91988 additions and 69123 deletions
15
examples/functions/inpath
Normal file
15
examples/functions/inpath
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
inpath()
|
||||
{
|
||||
path=$(echo $PATH | sed 's/^:/.:/
|
||||
s/::/:.:/g
|
||||
s/:$/:./
|
||||
s/:/ /g')
|
||||
|
||||
for x in $path
|
||||
do
|
||||
[ -x $x/$1 ] && { PROG=$x/$1; break; }
|
||||
done
|
||||
[ -z "$PROG" ]
|
||||
return
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue