Re: is this a bashism?
Shaleh writes:
> [ -x /usr/bin/update-menus ] && update-menus
> The problem with this is that ash incorrectly reads (or read) the -x. It
> behaves like a -f and not the intended "if it exists and is executable".
> It responds true for ANY file in /usr/bin, or other directories. Seems
> to catch the x bit from the directory and stop looking. This may be my
> bug report, I filed one similar against ash itself. I believe it has
> been fixed in ash and can safely be closed.
0.3.4-2 handles it correctly. What it does not handle correctly is:
set -e
case "$1" in
remove)
[ -x /bin/does-not-exist ] && echo "does-not-exist"
;;
esac
exit 0
--
John Hasler This posting is in the public domain.
john@dhh.gt.org Do with it what you will.
Dancing Horse Hill Make money from it if you can; I don't mind.
Elmwood, Wisconsin Do not send email advertisements to this address.
Reply to: