![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing a variable inside a variable to a function | KingVikram | UNIX for Dummies Questions & Answers | 2 | 01-14-2008 04:28 PM |
| How to replace variable inside the variable | mani_um | Shell Programming and Scripting | 31 | 08-09-2007 07:56 PM |
| Replace variable with a user defined variable | ce124 | Shell Programming and Scripting | 1 | 04-15-2007 11:56 AM |
| Export command giving Variable Name vs the Value set for the Variable | ParNone | UNIX for Dummies Questions & Answers | 2 | 04-03-2006 08:43 AM |
| ksh: A part of variable A's name is inside of variable B, how to update A? | pa3be | Shell Programming and Scripting | 4 | 03-30-2005 08:29 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
| Forum Sponsor | ||
|
|
|
|||
|
If you are using ksh93, you could also use a name reference (typeset -n) instead of eval:
Code:
#!/usr/bin/ksh93 YEAR=2007 MONTH=02 ym200702="01 02 05 06 07 08 09 12 13 14 15 16 19 20 21 22 23 26 27 28" typeset -n someVariable="ym$YEAR$MONTH" if [[ ! -z $someVariable ]]; then echo HIT fi |
|||
| Google The UNIX and Linux Forums |