Article View: comp.unix.shell
Article #1761Re: Using imbedded commands inside expr(1)
From: Tom Christiansen
Date: Thu, 08 Nov 1990 03:38
Date: Thu, 08 Nov 1990 03:38
10 lines
678 bytes
678 bytes
In article <1462@eastman.UUCP> gerwitz@kodak.com (Paul Gerwitz) writes:
>I seem to be having trouble using expr [in ksh]. The following dies:
>
> test=`expr `tail +3 file` + 1`
Write it this way:
test=$(expr $(tail +3 file) + 1)
--tom
Technical Details
Message-ID:
<108387@convex.convex.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!convex!convex.COMReferences:
<1462@eastman.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!convex!convex.COM From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.shell Subject: Re: Using imbedded commands inside expr(1) Message-ID: <108387@convex.convex.com> Date: 8 Nov 90 03:38:25 GMT References: <1462@eastman.UUCP> Sender: usenet@convex.com Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 10