Answers for "bash optional arguments"

2

optional argument bash

VAR="${1:-default}"
Posted by: Guest on June-16-2020
0

bash optional arguments

~$ sh co.sh
2017-01-05

~$ sh co.sh 2017-01-04
2017-01-04

~$ cat co.sh

DAY=${1:-$(date +%F -d "yesterday")}
echo $DAY
Posted by: Guest on January-26-2021

Code answers related to "bash optional arguments"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language