nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] Getting the location of the of the nmh executables fro


From: hymie
Subject: Re: [Nmh-workers] Getting the location of the of the nmh executables from a script
Date: Tue, 27 Jan 2015 13:25:13 -0500

#!/bin/sh

P=$PATH

while [ "x$P" != "x" ]
do
  D=`echo $P | cut -d: -f1`
  if [ -f $D/scan ]
  then
    echo "found $D/scan"
    exit 0
  fi
  P=`echo $P | cut -s -d: -f2-`
done

echo "did not find scan"
exit 1



address@hidden writes:
>How, from a script, can I get the location of the nmh executables. I don't
>mean the location of the "fancy" executables that `mhparam libexecdir`
>gets me, but the location of the "user" executables, like scan.
>Yes, I know, it will be in $PATH, but I want to make sure that I get
>the right component of $PATH.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]