Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!news.cs.indiana.edu!news.nd.edu!mentor.cc.purdue.edu!sage.cc.purdue.edu!asg From: asg@sage.cc.purdue.edu (The Grand Master) Newsgroups: comp.unix.shell Subject: Re: Use of "eval" in creating new variable names Keywords: eval, shell,help Message-ID: <12291@mentor.cc.purdue.edu> Date: 14 May 91 15:11:56 GMT References: <1991May13.180547.21281@cbfsb.att.com> Sender: news@mentor.cc.purdue.edu Reply-To: asg@sage.cc.purdue.edu (The Grand Master) Distribution: na Organization: Purdue University Lines: 17 In article <1991May13.180547.21281@cbfsb.att.com> pfinkel@cbnewsb.cb.att.com (paul.d.finkel) writes: }I have tried things like: eval tty_numb"$count"=`echo $2` }If I then try to echo the contents of my new variable, all I get is the number: }Example: echo $tty_numb"$count" This will give me 1 }expect it. Example: echo $tty_numb1 This will give me tty17 }echo $tty_numb"$numb" #This where the user chooses a number associated with Try: eval echo $tty_numb$count --------- ### ## Courtesy of Bruce Varney ### # aka -> The Grand Master # asg@sage.cc.purdue.edu ### ##### # PUCC ### # ;-) # # ;'> # ##