Article View: comp.unix.shell
Article #1720Using imbedded commands inside expr(1)
From: Paul Gerwitz
Date: Wed, 07 Nov 1990 19:06
Date: Wed, 07 Nov 1990 19:06
20 lines
1131 bytes
1131 bytes
I seem to be having trouble using expr. The following dies:
test=`expr `tail +3 file` + 1`
Basically get a numeric value from a file and increment it, putting the
result in a shell variable.
I have tried all kinds of convolutions of quoting etc.
Temporarily we have broken it up into several seperate statements.
Any clues ??
Running HP-UX at 7.0 using ksh.
--
+----------------------------------------------------------------------------+
| Paul F Gerwitz WA2WPI | SMTP: gerwitz@kodak.com |
| Eastman Kodak Co | UUCP: ..uunet!atexnet!kodak!eastman!gerwitz |
+----------------------------------------------------------------------------+
Technical Details
Message-ID:
<1462@eastman.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!rochester!kodak!eastman!kodak.comShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!rochester!kodak!eastman!kodak.com From: gerwitz@kodak.com (Paul Gerwitz) Newsgroups: comp.unix.shell Subject: Using imbedded commands inside expr(1) Message-ID: <1462@eastman.UUCP> Date: 7 Nov 90 19:06:52 GMT Sender: news@eastman.UUCP Organization: Eastman Kodak Co. Lines: 20 Originator: gerwitz@hpcore