#!/bin/bash
Glenn Steen
glenn.steen at GMAIL.COM
Wed Jan 11 09:42:10 GMT 2006
[ The following text is in the "ISO-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
On 11/01/06, Nerijus Baliunas <nerijus at users.sourceforge.net> wrote:
> On Wed, 11 Jan 2006 04:10:51 +0000 Julian Field <mailscanner at ECS.SOTON.AC.UK> wrote:
>
> > I entirely agree with you. I will have to go through the scripts that
> > have this and try to check that they don't have any bash-isms that I
> > know of. The only one that springs to mind is
> > export VARIABLE=value
> > which I will need to change to
> > VARIABLE=value
> > export VARIABLE
> >
> > What else should I be looking for? I tend to write for whatever
> > version of sh happens to be on the system I'm writing on at the time.
> > Bad practice, I know :-(
Using features you can test reliably being a bad practise? no:-).
Look for variable arithmetics... and almost any substitution can be
problematic (usually aren't, but still:).
I'm not sure I agree about the portability of bourne shells though...
nor korn for that matter. Been bitten in the past by things like "cmd
2>&1 > file" needing to be "cmd > file 2>&1" (more posixly correct,
true)... So insisting on bash isn't an entirely stoopid thing, since
things like that will be the same across platforms... My problems were
mainly in the ancient past (sunos4->aix 2.1-> diab denix, and more
recently going from DG/UX R4.20MU06&07 -> AIX 5.2), so might not be
that relevant:-):-).
> The easiest thing would be to release a new beta version with /bin/sh
> everywhere and let the users test it :)
Definitely the most effective method:)
--
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list