Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

default parameter value in bash

VAR=${1:-DEFAULTVALUE}
Comment

Default parameter value in bash

function server() {
    local port="${1:-8000}"
    python -m SimpleHTTPServer "$port"
}
Comment

bash add default argument

somecommand ${1:-foo}
Comment

PREVIOUS NEXT
Code Example
Shell :: How to remove a directory from git repository? 
Shell :: how to register nuget repository powershell 
Shell :: instal ng2 search module 
Shell :: zsh: command not found: sublime 
Shell :: git restore 
Shell :: remote: ! You are trying to install ruby-2.7.0 on heroku-20. 
Shell :: set default terminal ubuntu 
Shell :: install gdal django rest 
Shell :: pull file from specific commit git 
Shell :: sbatch cancel job 
Shell :: .m2 folder in unix 
Shell :: linux dig command all dns records 
Shell :: docker compose recreate 
Shell :: script delete files older than 
Shell :: kubernetes force delete command 
Shell :: zsh for 
Shell :: git merge to master 
Shell :: how to save ssh keygen How to add ssh keys to a specific user in linux? 
Shell :: set up vim in zsh 
Shell :: modifier un nom de branche git 
Shell :: npm checkup 
Shell :: image crop and center linux 
Shell :: apache airflow 
Shell :: $(cat <<EOF 
Shell :: shell get creation date of file 
Shell :: run tar.xz ubuntu 
Shell :: uncommit the last commit 
Shell :: renommer la branche main de git 
Shell :: linux copy directory 
Shell :: list all local branches off a branhc 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =