![]() |
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 |
| The Switch to DST 2007 --- How Did It Go? | Perderabo | What's on Your Mind? | 6 | 03-14-2007 11:18 PM |
| Switch | abey | High Level Programming | 12 | 06-27-2006 07:11 PM |
| switch from csh to ksh | veeracer | Shell Programming and Scripting | 8 | 11-05-2004 02:13 PM |
| switch from csh to ksh | veeracer | UNIX for Dummies Questions & Answers | 1 | 11-03-2004 06:28 PM |
| can you switch | neer45 | Shell Programming and Scripting | 3 | 12-05-2001 08:54 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
help on switch command
hi
can anybody help me with the switch syntax? set exam(AAA BBB CCC) foreach ii ($exam) switch ($ii) case $ii=="AAA" echo aaa breaksw case $ii=="BBB" echo bbb breaksw case $ii=="CCC" echo ccc endsw end I couldnt print out aaa.bbb and ccc as I want on screen. I guess it might be the problem of switch syntax. Can anyone help me? |
|
||||
|
if I have 2 nested foreach loop and I have two conditions to satisfy in switch case, how should I correct the syntax below to the correct one?
#! /usr/bin/csh set exam=(AAA BBB CCC) set son=(aa bb cc) foreach ii ($exam) foreach jj ($son) switch ($ii $jj) case "AAA"&&"aa" echo aaa breaksw default echo BBB CCC endsw end end |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|