linux file based using grep cmd -
i have series of files, example:
abc_dds_20150212_cd.csv abc_dds_20150210_20150212_cd.csv abc_dfg_20150212_20150217_cd.csv i want apply grep command in linux can extract first 2 files, not 3rd file ls.
i tried following:
grep -l "" *20150212* -- exclude *20150212_201502*
you can pipe grep -v:
grep -l "" *20150212* | grep -v "20150212_201502" i haven't seen people use grep -l though. using ls seems cleaner solution:
ls -l *20150212* | grep -v "20150212_201502"
Comments
Post a Comment