The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 03-18-2008
era
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
The square brackets [] need to be quoted or escaped, as they are metacharacters for the case matching. It basically uses the same patterns as for file globbing (wildcards).

Also I don't think you can group substring alternatives inside parentheses.

Try this.

Code:
case $chl in
   '[SM.APPLE_SWIFT_@AL]' | '[SM.APPLE_SWIFT_@DS]' | '[SM.APPLE_SWIFT_@DU]' | '[SM.APPLE_SWIFT_@DV]DV)]') 
  ... etc