[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Emacs Lisp for script writing

From: Cecil Westerhof
Subject: Re: Using Emacs Lisp for script writing
Date: Wed, 23 Dec 2009 07:27:20 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Tim X <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]