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: Wed, 23 Dec 2009 07:27:20 +0100 Organization: Decebal Computing Message-ID: <87637y2ojb.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> <87r5qm4bt8.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1261550505 12164 80.91.229.12 (23 Dec 2009 06:41:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Dec 2009 06:41:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 23 07:41:38 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 1NNKug-0002Lo-8U for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Dec 2009 07:41:38 +0100 Original-Received: from localhost ([127.0.0.1]:45179 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNKuf-0003Ms-S6 for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Dec 2009 01:41:37 -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!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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:bp7JG8ANejcgopfy1fKG+4D2tvI= Original-Lines: 30 Original-NNTP-Posting-Host: 84.53.123.169 Original-X-Trace: 1261549645 news.xs4all.nl 22917 decebal/[::ffff:84.53.123.169]:24885 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: news.stanford.edu gnu.emacs.help:175742 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:70818 Archived-At: Tim X 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 second this. If I remember correctly, to be posix compliant, you must > have sh, but you don't have to have bash or env. I have to look into that. I know that bash is not always there -I have worked on a Tru-64 system, which did not have it-, I also understood that /usr/bin/env should always be there -as a real file or a link- and I had it once -I think on a BSD system- that the shell was in another directory. But I 'always' work with bash, so it could be that /bin/sh is always there. So lets just change it. And if there is a system where there is not a /bin/sh lets hope that the administrator is willing to make the link. Otherwise the script(s) have to be changed, but that is no rocket science. ;-) On my system the three calls still work. ;-) -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof