Hi,
I am tasked to modify soem script and I come accross a line which I dont fully understand. I tried searching online but I couldnt get a good explanation on it.
Here it the part of the code:
PAY_RT=`cat $TEMPFILE | cut -f2 -d","`
if [ ${PAY_RT:-BLANK = 'P' ];
then
PAY_RT=R
fi
What is the colon ( and hypen (-) means on the if statement? I never used this on any of my if statement before.
There are also variation of :
if [ ${PAY_AMNT:-"00" = "000" ];
then
PAY_AMNT=00
fi