I am having trouble with a very simple bash script (test.sh):
if [ $# >=1 ]
then
backup_file=$1
else
backup_file=~/standard.tar.bz2
fi
echo $backup_file
If I pass an argument:
test.sh myfile
I get the expected output: myfile
Otherwise, I get no output. I am expecting to see (when test.sh is executed with no arguments): ~/standard.tar.bz2
What am I doing wrong?