The below command works in command line
rsync -avh -r /Source/09_03_2016/ /Destination/
echo $(basename !:3)
Output 09_03_2016
But when I do this in shell script it does not work
#! /bin/bash
/usr/bin/rsync -avh -r /Source/09_03_2016 /Destination/;
echo $(basename !:3)
Output !:3