Hi Experts,
I need one line script for the below requirement.
First it should check if a directory with todays date exist, and if not create it and move the PDF file to that directory.
thanks in advance!!!
Hi Experts,
I need one line script for the below requirement.
First it should check if a directory with todays date exist, and if not create it and move the PDF file to that directory.
thanks in advance!!!
it will check whehter the directory (YYYYMMDD) is exists or not. if exists move all the pdf files. if not create a directory and move all the pdf files into that directory
dirname=`date +%Y%m%d`; [ -d $dirname ] && mv *.pdf $dirname/ || ( mkdir $dirname && mv *.pdf $dirname/ )
Thanks for your reply.
It works perfectly...!!