Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 exptools 1/6/84; site ihuxx.UUCP Path: utzoo!watmath!clyde!burl!we13!ihnp4!ihuxx!ignatz From: ignatz@ihuxx.UUCP (Dave Ihnat, Chicago, IL) Newsgroups: net.unix Subject: Re: HELP! (What's wrong with this sh scr - (nf) Message-ID: <728@ihuxx.UUCP> Date: Thu, 26-Apr-84 19:54:29 EST Article-I.D.: ihuxx.728 Posted: Thu Apr 26 19:54:29 1984 Date-Received: Fri, 27-Apr-84 06:28:20 EST References: <3164@fortune.UUCP> Organization: AT&T Bell Labs, Naperville, IL Lines: 27 Esp. RE: X$var vs. "$var": This solution probably came from the example used in the USG (now WE) Unix(Tm, of course) manual for the expr(1) command. On the very last page of the man entry, they address the problem of null strings and the shell getting to them as follows: if a='=' expr $a = '=' then looks like expr = = = and fails! (note that expr "$a" = '=' also fails) Thus, they suggest expr X$a = X= to get around the problem. Dave Ihnat ihuxx!ignatz