|
|
From: David Grothe <d...@gcom.com>
Subject: Shell problem
Date: 1998/07/23
Message-ID: <35B74A06.CF165EF9@gcom.com>#1/1
X-Deja-AN: 374190917
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: Gcom, Inc
Mime-Version: 1.0
Reply-To: d...@gcom.com
Newsgroups: comp.unix.unixware.misc
I have run the following shell script on several different OS-s and
shells.
var="initial"
export var
echo "final" >junk.$$
while read line
do
echo $$ inside loop: before assignment: var=\"$var\"
line=\"$line\"
var="$var $line"
echo $$ inside loop: after assignment: var=\"$var\"
line=\"$line\"
done <junk.$$
echo $$ after loop: var=\"$var\"
rm junk.$$
There are two types of output:
Type 1:
4147 inside loop: before assignment: var="initial" line="final"
4147 inside loop: after assignment: var="initial final" line="final"
4147 after loop: var="initial"
Type 2:
4159 inside loop: before assignment: var="initial" line="final"
4159 inside loop: after assignment: var="initial final" line="final"
4159 after loop: var="initial final"
The following chart summarizes the results of the testing:
Operating System sh ksh
UnixWare 7 1 2
OpenServer 5 1 2
SPARC Solaris 1 2
Linux 2 2
To my mind, output type 2 is correct. Any comments? Any promises to
fix the behavior?
Thanks,
Dave
|
|
|
|
SCO's Case Against IBM
November 12, 2003 - Jed Boal from Eyewitness News KSL 5 TV provides an
overview on SCO's case against IBM. Darl McBride, SCO's president and CEO,
talks about the lawsuit's impact and attacks. Jason Holt, student and
Linux user, talks about the benefits of code availability and the merits
of the SCO vs IBM lawsuit. See SCO vs IBM.
|
|
|
|
|
Note: The materials and information included in these Web pages are not to
be used for any other purpose other than private study, research, review
or criticism.
|
|
|
|
|
|
|