This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Help on Scripts

Not realy thecorrect list, you need a shell scripting list or newsgroup like
however in bash something like 

-----------cut here--------------------------

#enter date here (using your example)
#set number here

for file in PPD.$DATE.* 
		echo $file
		grep -n $NUMBER $file
		echo "-----------------------"
-----------------------cut here-------------
should do the job.

(i'm only a dabbler in shell scripting though so test throughly :) 

> -----Original Message-----
> From: Amer Baig []
> Sent: 27 June 2003 11:04
> To:
> Subject: Help on Scripts
> This is first time I am using this mailing list, so please 
> direct me to
> right list if I am putting it on wrong place. I am IT professional
> working in a telecom sector.
> I have installed Cygwin on Windows Xp. I have file in a folder with
> names like PPD.20030116.0298, PPD.20030116.0299 , 
> PPD.20030117.0298 etc.
> Each file contains calls against a Mobile Number. I can grep those
> record from each file. The file name depicts the date. I am I am asked
> to grep call details of Mobile number 5100025 for 16 Jan 
> 2003. I need to
> find files for such dates then need to open each file and have to grep
> for 5100025. I need to write scripts which solve the purpose. Can
> anybody help me?
> Regards,
> --
> Unsubscribe info:
> Problem reports:
> Documentation:
> FAQ:         

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]