Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

case in fish

switch $animal
    case cat
        echo evil
    case wolf dog human moose dolphin whale
        echo mammal
    case duck goose albatross
        echo bird
    case shark trout stingray
        echo fish
    # Note that the next case has a wildcard which is quoted
    case '*'
        echo I have no idea what a $animal is
end
Source by fishshell.com #
 
PREVIOUS NEXT
Tagged: #case #fish
ADD COMMENT
Topic
Name
6+5 =