Bagi juragan pembaca yang belum atau ingin memahami lebih dalam tentang dunia internet agar memiliki skill/keterampilan bermain internet, di sini tempatnya
Home »
lainnya
» Shell Scripting Tutorial For Beginners Xiii - The Instance Tilt Example
Shell Scripting Tutorial For Beginners Xiii - The Instance Tilt Example
Posted by Hold
on January 23, 2017
#! /bin/bashecho -e "Enter roughly grapheme : \c"read valuecase $value in [a-z] ) echo "User entered $value a to z" ;; [A-Z] ) echo "User entered $value Influenza A virus subtype H5N1 to Z" ;; [0-9] ) echo "User entered $value 0 to 9" ;; ? ) echo "User entered $value exceptional character" ;; * ) echo "Unknown input" ;;esac
Output:
test@test$ ./hello.sh Enter roughly grapheme : fUser entered f a to ztest@test$ ./hello.sh Enter roughly grapheme : KUser entered K a to ztest@test$LANG=C test@test$ ./hello.sh Enter roughly grapheme : KUser entered K Influenza A virus subtype H5N1 to Ztest@test$ ./hello.sh Enter roughly grapheme : 9User entered nine 0 to 9test@test$ ./hello.sh Enter roughly grapheme : 5User entered five 0 to 9test@test$ ./hello.sh Enter roughly grapheme : &User entered & exceptional charactertest@test$ ./hello.sh Enter roughly grapheme : sdsdsdsdUnknown inputtest@test$
0 comments:
Post a Comment