From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12809 invoked by alias); 1 Feb 2011 21:46:31 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15752 Received: (qmail 6523 invoked from network); 1 Feb 2011 21:46:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at smasher.org designates 69.55.237.145 as permitted sender) Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Date: Wed, 2 Feb 2011 10:39:38 +1300 (NZDT) From: Atom Smasher In-Reply-To: <4D4850F7.6060205@gmail.com> Message-ID: <1102021037180.38606@smasher> MIME-Version: 1.0 OpenPGP: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt References: <4D4850F7.6060205@gmail.com> Subject: Re: Check existence of a program To: zsh-users@zsh.org, Anonymous bin Ich X-POM: The Moon is Waning Crescent (2% of Full) X-Hashcash: 1:20:1102012139:zsh-users@zsh.org::fSPQFqkNEhV4S8Wm:0000000000000000 0000000000000000000000000lKr X-Hashcash: 1:20:1102012139:ichbinanon@gmail.com::4LHSuK3ieCtbg+Aq:0000000000000 0000000000000000000000000FWl 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