Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: vamoose
"grep is my pick"

I use grep constantly too. I deal with a lot of output files from an engineering structural analysis. There are many post processing tools to filter out specific pieces of information. But if I need to know something unique about the results I grep it out.

I left sed in there even though I've started using perl command line more often.

Anything that I've been doing with let's say:

sed "s/regex/stuff/" file
I can do with
perl -p -e "s/regex/stuff/" file
and I even have the option of in-place editing with -i

But the biggest reason is that my "time" tests of perl line processing beats sed for large files.

61 posted on 12/18/2006 5:22:50 PM PST by avg_freeper (Gunga galunga. Gunga, gunga galunga)
[ Post Reply | Private Reply | To 57 | View Replies ]


To: avg_freeper

If you like the linux-y stuff, but circumstances dictatate Windows, you might want to have a look at Powershell.

$a %| -match "regex" | out-file


63 posted on 12/18/2006 5:39:31 PM PST by tacticalogic ("Oh bother!" said Pooh, as he chambered his last round.)
[ Post Reply | Private Reply | To 61 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson