🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1852

BOURNE SHMOURNE...

#1852
From: Joe Wasik
Date: Wed, 28 Nov 1990 00:00
23 lines
1304 bytes
Who would have thought that the Bourne could still be introducing problems,
but I think we've just discovered one.

The following script-excerpt displays $1 (from the command line), then resets
all $n parameters (with --), it should assign the value "a" to $1, then
display the "a".

echo $1
set -- a 
echo $1

When executed from the command line, it works.  When executed from a program
with system() while not passing it any aruments, it works.  Now give the same
script an argument, call it with system(),...  and it fails.  The second echo
still prints the command line argument, not the asigned "a".

We run Unix Sys V 3.1.1 on an AT&T 3B15.  This is not so much a question
as it is a "watch out."

-- 
Joe Wasik - PacBell, 2600 Camino Ramon, 4e750, San Ramon, CA 94583  415-823-2422
jcwasik@clib.pacbell.com or {att,bellcore,sun,ames,pyramid}!pacbell!clib!jcwasik
nbr_countries--; iraq += kuwait; price_oil *= 2; us_public = screwed;
Technical Details
Message-ID: <8338@pbhyf.PacBell.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!pacbell.com!pacbell!pbhyf!jwas

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!pacbell.com!pacbell!pbhyf!jwas
From: jwas@PacBell.COM (Joe Wasik)
Newsgroups: comp.unix.shell
Subject: BOURNE SHMOURNE...
Keywords: bug
Message-ID: <8338@pbhyf.PacBell.COM>
Date: 28 Nov 90 00:00:48 GMT
Organization: Pacific * Bell, San Ramon, CA
Lines: 23