From: Victor Eijkhout on 27 May 2010 23:21 In bash, "set -- $x" where x="a b" causes the effect of $1=a; $2=b Given the value of x, is there a csh construct that does the same? Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu
From: Kenny McCormack on 28 May 2010 06:13 In article <1jj68ot.kf16kr119ulbaN%see(a)sig.for.address>, Victor Eijkhout <see(a)sig.for.address> wrote: >In bash, "set -- $x" where x="a b" causes the effect of >$1=a; $2=b > >Given the value of x, is there a csh construct that does the same? > >Victor. >-- >Victor Eijkhout -- eijkhout at tacc utexas edu set argv=($x) -- > No, I haven't, that's why I'm asking questions. If you won't help me, > why don't you just go find your lost manhood elsewhere. CLC in a nutshell.
From: Victor Eijkhout on 28 May 2010 08:16 Kenny McCormack <gazelle(a)shell.xmission.com> wrote: > >In bash, "set -- $x" where x="a b" causes the effect of > >$1=a; $2=b > > > >Given the value of x, is there a csh construct that does the same? > > > >Victor. > >-- > >Victor Eijkhout -- eijkhout at tacc utexas edu > > set argv=($x) Many thanks. No amount of reading the man page suggested the use of parens. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu
From: Barry Margolin on 28 May 2010 22:59 In article <1jj6xin.bw9i1n18o8ds0N%see(a)sig.for.address>, see(a)sig.for.address (Victor Eijkhout) wrote: > Kenny McCormack <gazelle(a)shell.xmission.com> wrote: > > > >In bash, "set -- $x" where x="a b" causes the effect of > > >$1=a; $2=b > > > > > >Given the value of x, is there a csh construct that does the same? > > > > > >Victor. > > >-- > > >Victor Eijkhout -- eijkhout at tacc utexas edu > > > > set argv=($x) > > Many thanks. No amount of reading the man page suggested the use of > parens. From the man page on Mac OS X, which I assume is similar to other systems: set set name ... set name=word ... set [-r] [-f|-l] name=(wordlist) ... (+) set name[index]=word ... set -r (+) set -r name ... (+) set -r name=word ... (+) The fourth form shows using parens to set a variable to a list of values. -- Barry Margolin, barmar(a)alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***
|
Pages: 1 Prev: aborting a bash script with control-c Next: I have a question about bash period command |