Link to home
Create AccountLog in
Avatar of sam2929
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,
Avatar of ozo
ozo
Flag of United States of America image

grep 'aa@yahoo.com' *.csv
Avatar of Tintin
Tintin



grep -il 'aa@yahoo.com' *.csv

Open in new window

Avatar of sam2929

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
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of sam2929

ASKER

i am trying to find all files which have yahho.com records doing
grep -il '%yahoo.com%' *.csv its not giving me results
Does the file contain yahho.com or %yahoo.com% ?
Avatar of sam2929

ASKER

getting error below
 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' {} \;

Open in new window