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.
&:-)
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!