this is my piece of code:
##Checking swapspace if ignore option chosen will force creation of swap space
echo ; echo "[INFO]: Validating Swap space "
swapspace=`swapon -s|tail -1|awk '{print $3/1024}'`
if [ ${swapspace} -le 500 ]; then
echo $@ |grep ignore>/dev/null
if [ `echo $?` -eq 0 ]; then
echo "[WARNING]: Swap space is below minimum requirement get the same fixed :${swapspace}
Proceeding with WorkAround. PLEASE GET IT FIXED AT THE EARLIEST"
dd if=/dev/zero of=/swapfile bs=2G count=4
chmod 0600 /swapfile; mkswap /swapfile; swapon /swapfile
export SWAPFLAG=1
else
echo "[ERROR]: Swap space is below minimum requirement get the same fixed :${swapspace}"
export SWAPFLAG=2
fi
fi
can someone please explain what is echo $@ doing here?
PS: 'ignore is a hidden argument'