From owner-freebsd-questions@FreeBSD.ORG Wed Jan 25 23:52:23 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91C01106566C for ; Wed, 25 Jan 2012 23:52:23 +0000 (UTC) (envelope-from doug@polands.org) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.124]) by mx1.freebsd.org (Postfix) with ESMTP id 4B7938FC14 for ; Wed, 25 Jan 2012 23:52:22 +0000 (UTC) Received: from hrndva-omtalb.mail.rr.com ([10.128.143.51]) by hrndva-qmta03.mail.rr.com with ESMTP id <20120125220909887.TVE193@hrndva-qmta03.mail.rr.com> for ; Wed, 25 Jan 2012 22:09:09 +0000 X-Authority-Analysis: v=2.0 cv=T9kOvo2Q c=1 sm=0 a=IvncpQWizqU0KxmTkcmfsA==:17 a=Nr6nE-OiK0YA:10 a=fK95lxlcsZUA:10 a=PmjUu4vlE_IA:10 a=8nJEP1OIZ-IA:10 a=heic1XiU-m82wM2hwLsA:9 a=hUtj6njQBFAQzYzRRiQA:7 a=wPNLvfGTeEIA:10 a=IvncpQWizqU0KxmTkcmfsA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 67.52.213.147 Received: from [67.52.213.147] ([67.52.213.147:61937] helo=haran.polands.org) by hrndva-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 17/49-26414-84D702F4; Wed, 25 Jan 2012 22:08:08 +0000 Received: from email.polands.org (ararat.polands.org [172.16.1.20]) by haran.polands.org (8.14.4/8.14.4) with ESMTP id q0PM87ok055540 for ; Wed, 25 Jan 2012 16:08:07 -0600 (CST) (envelope-from doug@polands.org) Received: from 64.215.193.254 (SquirrelMail authenticated user djp) by email.polands.org with HTTP; Wed, 25 Jan 2012 16:08:07 -0600 Message-ID: Date: Wed, 25 Jan 2012 16:08:07 -0600 From: "Doug Poland" To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Portability of shell scripts from other *nixes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2012 23:52:23 -0000 Hello, I'm trying port some shell scripts to FreeBSD that were originally written on Darwin (OS X). The issue I'm having is the shebang line of the scripts in OS X is #!/bin/sh, and it turns out that is really an instance of bash, and the code contains some bashisms. On FreeBSD I have bash in /usr/local/bin/bash. Is there an "easy/best" way to have a single shebang that works on both OS's? I'd rather not change FreeBSD's bourne shell to bash with any symlinking of /usr/local/bin/bash to /bin/sh. -- Regards, Doug