TIP: Click on subject to list as thread! ANSI
echo: tuxpower
to: andrew clarke
from: Tony Langdon
date: 2016-05-24 09:05:00
subject: Re: Favs

-=> andrew clarke wrote to Ben Ritchey <=-

 ac> On some systems the "sh" command is not necessarily bash,
eg. in Ubuntu
 ac> it's dash, on FreeBSD it's FreeBSD's sh.

Same in Debian, I think it's ash, though I excluseively use bash myself

 ac> Usually when people refer to bash scripts what they really mean are sh
 ac> scripts, or scripts that will run under a POSIX 1003.2 compliant shell,
 ac> of which bash is one.

 ac> It's usually a good idea to avoid using bash extensions in scripts.
 ac> Fortunately this isn't common.

I do use quite a few bash extensions, but I also specify #!/bin/bash in my
scripts, so they'll run on any system that has bash installed, so I tend not to
run into those compatibility issues.

 ac> Lastly, you might find that if your shell scripts ever begin to get
 ac> complicated you'll want to rewrite them in a more suitable language
 ac> (Python is common). Robust sh scripts tend to be difficult to
 ac> understand and debug when there's a lot going on, and can fail in
 ac> strange ways...

Some of mine do get like that. :)  But learning an entirely new scripting
language takes time I don't often have.


... PCDOS&MSDOS&CP/M&WINDOWSI'LLFIDDLEWITHOS/2WOULDN'TYOU
--- MultiMail/Win32 v0.49
* Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
SEEN-BY: 633/0 267 280 410 640/384 712/848 770/1
@PATH: 633/410 280 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.