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,
System ProgrammingLinux OS Dev

Avatar of undefined
Last Comment
Tintin
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
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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of sam2929
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
Avatar of ozo
ozo
Flag of United States of America image

Does the file contain yahho.com or %yahoo.com% ?
Avatar of sam2929
sam2929

ASKER

getting error below
 grep -il  'aa.yahoo.com' *_reg.csv
ksh: /usr/bin/grep: 0403-027 The parameter list is too long.
Avatar of Tintin
Tintin

In that case, do

find . -name "*_reg.csv" grep -il 'aa.yahoo.com' {} \;

Open in new window

System Programming
System Programming

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

41K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo