Use of "eval" in creating new variable names

The Grand Master asg at sage.cc.purdue.edu
Wed May 15 01:11:56 AEST 1991


In article <1991May13.180547.21281 at cbfsb.att.com> pfinkel at 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 at sage.cc.purdue.edu             ###    #####       #
PUCC                               ###                #
;-)                                 #                #
;'>                                #               ##



More information about the Comp.unix.shell mailing list