It probably depends on your shell.  But most shells should have the "which"
builtin

$ which scan
/usr/local/nmh/bin/scan

If you want to be super portable, there's probably a way to separate
the PATH variable using : as your delimeter and check echo entry
for $dir/scan ... but I can't get the splitting-up part to happen
off the top of my head.

--hymie!    http://lactose.homelinux.net/~hymie    [email protected]

[email protected] 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.
>
>    Norman Shapiro


_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to