Date: Wed, 25 Jan 2012 23:35:52 -0500 (EST) From: vogelke+unix@pobox.com (Karl Vogel) To: freebsd-questions@freebsd.org Subject: Re: Portability of shell scripts from other *nixes Message-ID: <20120126043552.E9859BF90@kev.msw.wpafb.af.mil> In-Reply-To: <ac1be76b3dd10516e61861ae253b793f.squirrel@email.polands.org> (doug@polands.org) References: <ac1be76b3dd10516e61861ae253b793f.squirrel@email.polands.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>> On Wed, 25 Jan 2012 16:08:07 -0600, >> "Doug Poland" <doug@polands.org> said: D> I'm trying port some shell scripts to FreeBSD that were originally D> written on Darwin (OS X). The issue I'm having is the shebang line of D> the scripts in OS X is #!/bin/sh, and it turns out that is really an D> instance of bash, and the code contains some bashisms. On FreeBSD I D> have bash in /usr/local/bin/bash. D> Is there an "easy/best" way to have a single shebang that works on both D> OS's? I'd rather not change FreeBSD's bourne shell to bash with any D> symlinking of /usr/local/bin/bash to /bin/sh. Do you have the Korn shell installed? I've found that to be a nice compromise for scripts that have bash-isms. -- Karl Vogel I don't speak for the USAF or my company Texted a friend meaning to ask if she was busy. Me: "Are you busty?" Her: "They're manageable, what's up?" --Jimmy Fallon, #textingdisaster tweets, 13 Jan 2012
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120126043552.E9859BF90>