LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] [OT puzzle] Grep regex Answers

[ILUG] [OT puzzle] Grep regex Answers

Proinnsias Breathnach proinnsias at linux.ie
Thu Jun 29 13:37:29 IST 2006


On Thu, Jun 29, 2006 at 01:12:32PM +0100, Declan Moriarty wrote:
> To trim the crud, Proinnsias offered 
> > Probably easily solved by adding a :
> > 	| sed -e 's/ .*$//' 
> > before the | less 
> 
> This was excellent - it provided the correct search term. It didn't
> work, mind you. I got a list of lines saying 
> Visited:
> and nothing more. So the correct answer seems to have been
> 
> strings index.dat | grep Visited |less 
> 

*ah* ... If we'd known the lines started with "Visited: " we could have
made the job much easier ...

strings index.dat | grep ^Visited | sed -e 's@\(/.*\) .*$@\1@' | less

Should do the trick - again, untested and ymmv

(we're looking for a / followed by a number of characters before a space
and a number of characters preceeding the EoL char ($) and stripping the
space up to the EoL, this should do the job.

P



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell