Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

[Discuss] Scripting languages (was Re: rsync v. cp in data migration)



On Mon, May 27, 2013 at 11:11:03AM -0400, Richard Pieri wrote:
> I'm not a programmer. Never was, probably never will be. I'm a
> sysadmin.  Bourne is my go-to language for anything repetitive for
> two simple reasons: it's there, and it doesn't change. Every UNIX
> and Unixalike has Bourne shell. Every single one. And it works the
> same on all of them. 

They don't though, which is in fact one of the mines in the mine field
I mentioned.  Just to give one concrete example:  The built-in echo
command behaves differently on SysV-based Unix and BSD-based Unix.
Typically on those systems, the on-disk echo command behaves as does
the shell built-in, though some systems may have both versions
installed in different paths... 

We witnessed some of the problems that this causes when Debian
switched from using bash to dash as its rc script shell.  That switch
broke many things (though many of those things were caused by scripts
using bash-isms, not all of them were).  These days, on many Unix
systems, the Bourne shell is actually the "POSIX-compatible" shell,
which again, behaves differently from the original Bourne shell,
though you might (or might not) be able to induce it to behave like
the Bourne shell by setting certain environment variables...  

And believe it or not, I have actually come across installed Unix
systems where the system shell was csh, and there was no
bourne-compatible shell installed on the machine.  This was no doubt
due to a bad decision on the part of the guy running the machine, but
not everyone managing Unix systems has the same level of knowledge,
skill, etc..

But I take your point:  You MOSTLY can write shell scripts that are
compatible on all Unix systems, IFF you're very careful to only use
Bourne-compatible syntax.  But you have to know what that subset of
features and syntax is...

Still, these days, it's hard to find a Unix system that doesn't have
either Perl or Python installed, or at least have them as a
vendor-provided option.  And of course, if you're the sysadmin, you
can install them yourself, from sources if need be.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org