Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mordor.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!zehntel!dual!mordor!jdb From: jdb@mordor.UUCP (John Bruner) Newsgroups: net.unix-wizards Subject: /bin/sh variable substitution Message-ID: <4260@mordor.UUCP> Date: Fri, 29-Jun-84 15:44:50 EDT Article-I.D.: mordor.4260 Posted: Fri Jun 29 15:44:50 1984 Date-Received: Sun, 1-Jul-84 06:36:50 EDT Organization: S-1 Project, LLNL Lines: 30 I noticed recently that the (Bourne) shell's ${X=y} construction does not have the behavior that I expected. It appears that when a variable is assigned a quoted value, for example: ${XYZZY="plugh"} ${XYZZY='plugh'} that every character of the quoted value is stored with the 0200 bit on. Normally this has no visible effect because the shell strips the eighth bit (along with non-printable characters) after variable substitution when it evaluates a command. However, this is not the case for "<<" I/O redirection: the variables are passed unfiltered. For instance, in the following case: cat > plover <