![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| calling a variable to echo to a log | luma | Shell Programming and Scripting | 1 | 08-17-2007 11:30 PM |
| set variable to Home, then echo it to screen | amidget | UNIX for Dummies Questions & Answers | 3 | 02-23-2006 10:23 PM |
| Passing output of sed/echo to a variable | donflamenco | Shell Programming and Scripting | 11 | 07-13-2005 11:08 AM |
| assigning variable value using echo | shellburger | Shell Programming and Scripting | 2 | 07-11-2005 12:52 PM |
| Display from a variable using echo. | jagannatha | UNIX for Dummies Questions & Answers | 4 | 06-12-2003 04:38 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
echo variable problem
hi
I have say five variable. I would ask the user which one they want me to print and then print accordingly. TEST_1='10.2.3.4' TEST_2='11.2.3.5' TEST_3='12.2.3.5' TEST_4='13.2.3.5' TEST_5='14.2.3.5' print_var() { echo "Accessing var num $1" echo TEST$1 #??? But How do I print the value of say TEST_1 here base on user input } echo -n "Please enter the var num: " read num print_var $num |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|