From owner-freebsd-questions@FreeBSD.ORG Fri Oct 10 17:38:43 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A2B37B9 for ; Fri, 10 Oct 2014 17:38:43 +0000 (UTC) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00065A1B for ; Fri, 10 Oct 2014 17:38:42 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id hi2so2756305wib.15 for ; Fri, 10 Oct 2014 10:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=FBEGGT0qOR3tPWMyonXnRakSY1tYY3lpr9SMjvPGC0w=; b=Ph2OWuEmCBwz95+HKl21WQJHKIoTKVRud/qbackbvEuxxIM8IjbS8C1iaP0ZXXLgG4 5gufUOP/oPhs8/tvXFiED6YS7vinTH2D2hzXoHylsOZVjezgAfOTfqMW5DJxyORhdh1I FluCXqYFSjZJReBcM1XR4/pgwa7F1RwJ2L7VWnNUciGPjZfP+nNF516Ojmz/FxQC4FEM Wg1X22jyB3yrcdOsVQ0biQnTu4NytP2A4IKTfmKAMpJ60ceURzfav1LoLxSR/gNxLjIX +c4BHSLHGgESedO5SJZcNw2VShPv9xhkq6DkW/85WvQg9bPnIzhS7Mo/77v4fSObzlCg PiLw== X-Received: by 10.194.3.42 with SMTP id 10mr4575330wjz.98.1412962721182; Fri, 10 Oct 2014 10:38:41 -0700 (PDT) Received: from gumby.homeunix.com (5ec1f671.skybroadband.com. [94.193.246.113]) by mx.google.com with ESMTPSA id ic4sm3302106wid.19.2014.10.10.10.38.14 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Oct 2014 10:38:15 -0700 (PDT) Date: Fri, 10 Oct 2014 18:38:14 +0100 From: RW To: freebsd-questions@freebsd.org Subject: Re: sh man page .... Message-ID: <20141010183814.3ae32a05@gumby.homeunix.com> In-Reply-To: <5437FB8B.9080008@hiwaay.net> References: <5437FB8B.9080008@hiwaay.net> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2014 17:38:43 -0000 On Fri, 10 Oct 2014 10:30:19 -0500 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). Can you give an example? $ sh $ echo $((1+c)) 1