date_range=$1
base_dir=/u01/app/date_list
for currentDt in $(echo ${date_range} | sed "s/,/ /g")
do
if ([ "${currentDt}" != "" ] || [ "${currentDt}" != "*" ]); then
# is this enough? or can we add some more validation ?
# rm -Rf ${base_dir}/${currentDt}
fi
done
ASKER
ASKER
Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.
TRUSTED BY
Similar to this https://www.experts-exchange.com/questions/28963539/Unix-How-to-Bulk-Remove-Multiple-Directories-from-FileSystem.html
mkdir empty_dir
for date in 2016-09-11 2016-09-13 2016-09-15 ...
do
rsync -a --delete empty_dir /u01/app/date_pist/$date
done