![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| case statement | c00kie88 | Shell Programming and Scripting | 2 | 10-12-2008 05:08 PM |
| If or Case Statement | Ernst | UNIX for Dummies Questions & Answers | 1 | 09-24-2008 05:00 PM |
| case statement | bkan77 | Shell Programming and Scripting | 5 | 09-11-2007 05:54 PM |
| Case Statement | Zeta_Acosta | Shell Programming and Scripting | 19 | 04-06-2004 04:16 PM |
| case statement | Bab00shka | Shell Programming and Scripting | 1 | 07-15-2002 05:31 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Creating a dynamic case statement
I'm using the korn shell and trying to create a case statement from the contents of a file that is changed regularly,
each line of the file has three fields, eg track1 202.111.111.111 99 room7 222.111.222.333 76 I'm using awk to select each variable. I've been unable to figure out how to do this does anyone have any suggestions on? Last edited by squrcles; 12-09-2008 at 07:06 AM.. Reason: ammending for clarity |
|
||||
|
the i/p value is not relevant, all that is required is to make a case statement using the contents of a a file that is regularly changed
case "$var" in track1) commands; ;; room7) commands; ;; *) commands; ;; esac Last edited by squrcles; 12-09-2008 at 08:10 AM.. |
![]() |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|