Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!rutgers!gatech!udel!burdvax!wrp From: wrp@PRC.Unisys.COM (William R. Pringle) Newsgroups: comp.unix.shell Subject: Re: Using imbedded commands inside expr(1) Summary: Quote with backslashes Message-ID: <15525@burdvax.PRC.Unisys.COM> Date: 8 Nov 90 04:56:33 GMT References: <1462@eastman.UUCP> Organization: Unisys Corporation, Paoli Research Center; Paoli, PA Lines: 15 In article <1462@eastman.UUCP> gerwitz@kodak.com (Paul Gerwitz) writes: >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. The backslash can be used to quote nested backward quotes (and other strange characters): test=`expr \`tail +3 file\` + 1` Bill Pringle