Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Default parameter value in bash

function server() {
    local port="${1:-8000}"
    python -m SimpleHTTPServer "$port"
}
Source by coderwall.com #
 
PREVIOUS NEXT
Tagged: #Default #parameter #bash
ADD COMMENT
Topic
Name
2+4 =