for filename in `ls $foldpath`
do
if [[ $filename =~ .*_raw_.*\.csv ]] # find the file with name like 'sss_raw_df.csv'
then
#do process
fi
done
if [ -d $filepath ] #check if the filepath is a fold
if [ -f $filepath ] # check if the filepath is a file
if [ -e $filepath ] # check if the path is exist
网友评论