sam2929
asked on
Find column content from 30 files
Hi,
i have like 30 files
1001a_test_20110413.csv
1003a_test_20110211.csv
1004_test_20110122.csv and so on
in this file contents are
id firstname lastname email company
i am trying to find file (.csv file) which contains email aa@yahoo.com how can i find it
(As i don't know out of 30 files which file have email aa@yahoo.com)
Thanks,
i have like 30 files
1001a_test_20110413.csv
1003a_test_20110211.csv
1004_test_20110122.csv and so on
in this file contents are
id firstname lastname email company
i am trying to find file (.csv file) which contains email aa@yahoo.com how can i find it
(As i don't know out of 30 files which file have email aa@yahoo.com)
Thanks,
grep 'aa@yahoo.com' *.csv
grep -il 'aa@yahoo.com' *.csv
ASKER
ok i have some .csv files from april 28 and some from may 14 any quick way to count how many .csv
files we have from from may 14
files we have from from may 14
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
i am trying to find all files which have yahho.com records doing
grep -il '%yahoo.com%' *.csv its not giving me results
grep -il '%yahoo.com%' *.csv its not giving me results
Does the file contain yahho.com or %yahoo.com% ?
ASKER
getting error below
grep -il 'aa.yahoo.com' *_reg.csv
ksh: /usr/bin/grep: 0403-027 The parameter list is too long.
grep -il 'aa.yahoo.com' *_reg.csv
ksh: /usr/bin/grep: 0403-027 The parameter list is too long.
In that case, do
find . -name "*_reg.csv" grep -il 'aa.yahoo.com' {} \;