Here is my script
data_dir="/home/data" shopt extglob files=!($data_dir/*08142014*) echo ${files[@]} for file in $files[@] do #blabla done /home/data contains multiple files with different date info within file name, thus I should be able to get a list of files that does not contain "08142014".
But kept get syntax error. It seems files is just "!(/home/data/08202014)", while I want a list of file names.
Did I miss anything? Thanks
lsshow you the same?