Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash switch case

case $1 in
start)
    #Start logic
    ;;
stop)
    # Stop logic
    ;;
*)
	# Default logic
    echo $"Usage: $0 {start|stop}"
    exit 1
    ;;
esac
Comment

Bash switch

case "$C" in
"1")
    do_this()
    ;;
"2" | "3")
    do_what_you_are_supposed_to_do()
    ;;
*)
    do_nothing()
    ;;
esac
Comment

PREVIOUS NEXT
Code Example
Shell :: how to terminate localhost 3000 linux 
Shell :: add user sudoers arch 
Shell :: npm install express 
Shell :: how to install pip ubuntu python2 
Shell :: read cpu temperature ubuntu 
Shell :: push git repo to github 
Shell :: watch tail file linux 
Shell :: add ignored file to git 
Shell :: how to delete a folder in github 
Shell :: bluetooth does not work after lock ubuntu 
Shell :: Package signatures do not match previously installed version; ignoring! 
Shell :: How do I undo the most recent local commits in Git? 
Shell :: add local gitignore file 
Shell :: take sudo access inside vim 
Shell :: rename github repository command line 
Shell :: list users on server 
Shell :: open folder 
Shell :: Run speedtest from command line 
Shell :: start mongodb ubuntu 
Shell :: hard link linux 
Shell :: how to delete all history for specific search term in chrome 
Shell :: error when i install sass 
Shell :: how switching in git branches 
Shell :: update gradle version command line 
Shell :: install npm windows subsystem linux 
Shell :: sed from start to match 
Shell :: how to check open vpn on ubuntu 
Shell :: git remove all user data 
Shell :: where are dns entries on linux 
Shell :: install clamav terminal 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =