Mailinglist Archive: opensuse (818 mails)

< Previous Next >
Re: [opensuse] different types of shell scripts
  • From: Roger Oberholtzer <roger@xxxxxx>
  • Date: Thu, 22 Sep 2011 13:20:07 +0200
  • Message-id: <1316690407.21158.45.camel@acme.pacific>
On Thu, 2011-09-22 at 10:40 +0200, jdd wrote:
Le 22/09/2011 10:26, Roger Oberholtzer a écrit :

I would do this:

chmod +x

by the way, for a shell script, simply use "sh ./filename"

Of course that works. OTOH, if the script starts with, say,


then your method runs an additional unneeded shell to run python.

Of course, the problem with my method is it assumes that there is a


on the first line.

So, the very first thing to do is to look at the first line of the
script. It it has a #!shell-something, then I prefer my method.
Otherwise, you need to verify what shell it is written for and then
envoke that as required.



Yours sincerely,

Roger Oberholtzer

OPQ Systems / Ramböll RST

Office: Int +46 10-615 60 20
Mobile: Int +46 70-815 1696

Ramböll Sverige AB
Krukmakargatan 21
P.O. Box 17009
SE-104 62 Stockholm, Sweden

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups