![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk computed variable names | craig06y | Shell Programming and Scripting | 4 | 02-05-2008 01:50 PM |
| echo contents of differing variable names | gefa | Shell Programming and Scripting | 2 | 05-24-2005 08:49 AM |
| KDE names | gnerd | What's on Your Mind? | 1 | 07-18-2004 11:26 AM |
| Variable assignment for file names. | jagannatha | UNIX for Dummies Questions & Answers | 2 | 05-29-2003 05:38 PM |
| Variable names | Bab00shka | Shell Programming and Scripting | 4 | 08-15-2002 12:00 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Variable names
Hi,
I have a variable v_iteration which can equal any 3 digit number eg 001 or 926 I would like to dynamically make a new variable name up using this 3 digit number eg v_another_variable_001=fred v_another_variable_926=joe The following are examples of what I have tried v_another_variable_$v_iteration=fred v_another_variable_"$v_iteration"=fred and eval v_another_variable_"$_viteration"=fred all of which return the following error v_another_variable_ : parameter not set Can anyone help me with this please? I am using Korn Shell. Many thanks Helen |
|
||||
|
Thanks vgersh
In my effort to simplify the problem, I think I got it out of context. The actual line I'm getting the error on (and am still getting the error) is eval v_another_variable_${v_iteration}="$v_another_variable_${v_iteration}""$v_different_variable_${v_ite ration}" I am making an attempt to append the contects of v_different_variable_$(v_iteration} on to the contents of v_another_variable_${v_iteration} Any further help would be greatly appreciated! Many thanks Helen ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|