From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.emacs.help Subject: Re: Using Emacs Lisp for script writing Date: Tue, 22 Dec 2009 21:49:59 +0100 Organization: Decebal Computing Message-ID: <87d4263f9k.fsf@Traian.DecebalComp> References: <87hbrrrl3c.fsf@Traian.DecebalComp> <87vdg09ls9.fsf@Traian.DecebalComp> <87y6kv7tzb.fsf@Traian.DecebalComp> <87zl5b41fu.fsf@lion.rapttech.com.au> <871vinrp52.fsf@hubble.informatimago.com> <87skb32b5h.fsf@Traian.DecebalComp> <87ws0erfvz.fsf@hubble.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1261518062 490 80.91.229.12 (22 Dec 2009 21:41:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Dec 2009 21:41:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 22 22:40:55 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NNCTO-0002ud-Cr for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Dec 2009 22:40:54 +0100 Original-Received: from localhost ([127.0.0.1]:59225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNCTO-0003lN-CP for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Dec 2009 16:40:54 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.help X-Homepage: http://www.decebal.nl/ User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) Cancel-Lock: sha1:Z7Ekc0ItlpXQWmhKpkzL7sFQvz8= Original-Lines: 22 Original-NNTP-Posting-Host: 84.53.123.169 Original-X-Trace: 1261515000 news.xs4all.nl 22933 decebal/[::ffff:84.53.123.169]:14118 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: news.stanford.edu gnu.emacs.help:175733 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70809 Archived-At: pjb@informatimago.com (Pascal J. Bourguignon) writes: > Cecil Westerhof writes: >> Works like a charm. I made it: >> #!/usr/bin/env bash > > IMO, there's higher probability that /bin/bash be present than /usr/bin/env. > And even higher probability that /bin/sh be present. > > Since you're not using any bash feature in the script, you could as > well go for the sure case, and use #!/bin/sh. I have once been on a system where the shells were in a different directory. (I think it was a BSD system.) As I understand it /usr/bin/env should be on every system, as a real file or a link. That is why I use /usr/bin/env. But properly sh would be better instead of bash. There are systems where bash is not installed. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof