start-stop daemon

Michael A. Peters mpeters at mac.com
Fri Apr 25 04:30:16 PDT 2003


No it doesn't - give an exit status of 0 on bogus arguments.
Means it needs more that one line to mean anything.

#!/bin/bash
executable=`type -pa "$@" |head -1`
if [ ! "x$executable" = "x" ]; then
        echo $executable
else
        exit 1
fi

On Wed, 2003-04-23 at 17:34, Michael A. Peters wrote:
> Works very well, too :)
> 
> On Wed, 2003-04-23 at 12:04, Matthias Benkmann wrote:
> > Mine is short and also works nicely:
> > 
> > #!/bin/sh
> > type -pa "$@"|head -1
> > 
> > MSB
> -- 
> Michael A. Peters <mpeters at mac.com>
-- 
Michael A. Peters <mpeters at mac.com>

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list