Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Check existence of a program
- X-seq: zsh-users 15752
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx, Anonymous bin Ich <ichbinanon@xxxxxxxxx>
- Subject: Re: Check existence of a program
- Date: Wed, 2 Feb 2011 10:39:38 +1300 (NZDT)
- In-reply-to: <4D4850F7.6060205@gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
- References: <4D4850F7.6060205@gmail.com>
On Tue, 1 Feb 2011, Anonymous bin Ich wrote:
I am having trouble checking for existence of a program.
==============
[[ -x $(whence -p program) ]] && echo $(whence -p program)
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"We do many things at the federal level
that would be considered dishonest and
illegal if done in the private sector."
-- Ronald Reagan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author