The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Calling a perl script from a perl script new2ss Shell Programming and Scripting 6 05-24-2009 06:03 PM
Include PERL script with in the unix shell script ganapati UNIX for Dummies Questions & Answers 1 04-29-2008 01:18 PM
here document to automate perl script that call script hogger84 Shell Programming and Scripting 3 10-22-2007 11:15 AM
Modify Perl script to work with txt - Permissions script joangopan Shell Programming and Scripting 1 09-13-2007 12:38 AM
Perl: Run perl script in the current process vino Shell Programming and Scripting 10 12-09-2005 10:45 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-02-2006
Terrible
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Desperately Need Help On This Perl script

ok, i dont know any perl. actually, very very little. not much at all.

now, the task i have is that i have to go into a directory that is packed with hundreds of files that contains lots of strings of which i have to filter through. so when i get into this directory, i type:

grep -r akamai * in the directory.


the above grep command spits out series of output similar to the below:

/excite/homepagepoll/ans_jan24_02.oft: <IMG SRC="http://a88.g.akamai.net/f/88/606/1d/image.lovesluudf.com/people/images/global/poll/popuptop.gif" WIDTH="468" HEIGHT="62" BORDER="0">


the path to the left of the colon of the above output represents the absolute path to the file in which the string i wanted is found.

now, my task is, i have to write a Perl script that will filter through the result of the "grep -r akamai *" and then produce a line that only contains the filename and the akamai string.

meaning, the resulting output should be something similar to:

/excite/homepagepoll/ans_jan24_02.oft: http://a88.g.akamai.net/f/88/606/1d/...l/popuptop.gif

basically, something that greps out the filename and the just the link(s) that is contained in that file which matches the "akamai"

sorry for the long read. but i just needed to clarify. someone please help. all i need is just something to get started with.
 

Bookmarks

Tags
perl, perl shift, shift, shift perl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0