The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
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 12-19-2008
alex_5161 alex_5161 is offline
Registered User
  
 

Join Date: Jan 2007
Location: Detroit
Posts: 124
Thank you, it is good: last 2 are pretty nice, the 'case' is interesting, too, but little wordy.
Neither one way did come to my mind.

In my bash the match operator works; so it is best:
Code:
> a="string with piece to search"
> [[ $a =~ piece ]] && ec da || ec net
da
>
Appreciate your addvice!