How to copy sas file from prior version directory to new version directory in unix script-automatically?Here prior version = 15_1      Newer version = 16_0/data/temp/15_1/ -rwxr-x---   2  mit.sas/data/temp/16_0
copy sas file from prior version directory to new version directory
shell script
# in bashshopt -s extglobcd /data/tempdirs=$(echo $(ls [1-9]*([0-9])_[0-9] | sort -rn | head -n 2))# if there are no other files and directories you can use ls | in the line abovenewer=${dirs% *}prior=${dirs#* }test -z $newer && exit 1test -z $prior && exit 1cp -p ${prior}/mit.sas $newer/