sh man page ....

CyberLeo Kitsana cyberleo at cyberleo.net
Sat Oct 11 23:55:23 UTC 2014


On 10/10/2014 10:30 AM, William A. Mahaffey III wrote:
> 
> 
> I have a FBSD 9.3 desktop that supplanted a Linux FC14 desktop used for
> web access, some light development, & other day-to-day tasks (i.e. my
> daily driver, so to speak). I had a bunch of shell scripts written to
> use Linux sh, which was in fact bash, which means it had a superset of
> the arithmetic operators that traditional sh had. When I use these
> scripts under sh under FBSD 9.3, they largely work, though there are
> some minor differences (empty strings evaluate to zero (0) under bash,
> error under sh). The man page for sh doesn't reflect some of these
> compatibilities/incompatibilities, & is a bit short on its description
> of arithmetic evaluations in general. It would be sweet if it were
> updated to document more of the differences/similarities w/ bash, since
> there a clearly a decent number of similarities, & only a few (for me)
> differences. TIA ....

Try running devel/checkbashisms against the scripts. It's something
Debian uses to ease migration from Bash to Dash in their base system,
and I've found it rather useful to ensure no bashisms sneak into my own
portable scripts.

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<CyberLeo at CyberLeo.Net>

Furry Peace! - http://www.fur.com/peace/


More information about the freebsd-questions mailing list