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] regex newbie question

[ILUG] regex newbie question

Hanafin, Jenny jenny.hanafin at nuigalway.ie
Mon Aug 11 09:57:56 IST 2008


Hi Andrew,

thank you so much for pointing that out, the output from ls was the problem, not the grepping after all.

Jenny


-----Original Message-----
From: Andrew McGill [mailto:glug at lunch.za.net]
Sent: Sat 09/08/2008 07:02
To: ilug at linux.ie
Cc: Hanafin, Jenny; Padraig Kitterick
Subject: Re: [ILUG] regex newbie question
 
On Friday 08 August 2008 18:25:06 Hanafin, Jenny wrote:
> I've tried that egrep expression and egrep hung, so I put quotes around it
> and it worked, but returned no matches. I'm not finding that egrep is any
> more consistent than grep, though, this is a result I got from playing
> around a bit with your suggested expression:
>
> [219]: ls /data/gps/TEMP | egrep '^[[:alpha:]]{4}[0-9]{3}[a-x]'
> MACE213h.08n  MACE213h.08o  mace.lst      VLNT160z.08n  VLNT160z.08o
> VLNT213l.08n  VLNT213l.08o  VLNT.apr      vlnt.lst
>
> so egrep is still returning 'vlnt.lst' which contains no digits. 
It looks as if you have an alias for ls, alias ls="ls -C".  Have a look at the 
output of 
	ls /data/gps/TEMP | egrep --color '^[[:alpha:]]{4}[0-9]{3}[a-x]'
That will highlight the matching part for you.

&:-)



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