[Gllug] problems with grep
Dan Kolb
gllug at eco.li
Wed Nov 23 16:55:18 UTC 2005
On Wed, Nov 23, 2005 at 04:40:48PM +0000, Anthony Newman wrote:
> charles wrote:
> >grep -E 'e$' words2.txt
> >
> >doesn't work either. Any more suggestions?
>
> Yes it does. What platform and version of grep are you using? My
> suggestion works fine on a newish Linux box (GNU grep), on a Solaris 8
> Sparc box (horrid Sun grep), a Cobalt RaQ running Linux 2.0, etc. It
> basically works everywhere, even without the -E 'extended' flag that I
> think is a GNU feature ;-)
Not entirely :-) OpenBSD's grep (not GNU) also honours the -E flag. As for a
useful suggestion, if it is an errant ^M creeping in, then the following should
work:
cat words2.txt | td -d "\r" | grep "e$"
Dan
--
Others will look to you for stability, so hide when you bite your nails.
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list