The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #5 (permalink)  
Old 04-21-2009
dr.house dr.house is offline
Registered User
  
 

Join Date: Dec 2008
Location: Switzerland
Posts: 227
Quote:
Originally Posted by bashshadow1979 View Post
What I'm trying to do is to have a script where I can send one parameter and based on that parameter execute a function.
I'd rather use cases, e.g.:

Code:
case $1 in
"brazil1")
  # do this
;;
"brazil2")
  # do that
;;
*)
  # oops ;-)
;;
esac
(background information)