Page 1 of 1

Using GREP commands (or maybe not)

Posted: Mon Jan 11, 2010 12:48 pm
by Andycal
Hiya all,

Been playing with GREP on linux to rip through some files and extract the 'title', 'keywords' and 'description' tag out of web pages. I now want to convert this to RunRev to create a desktop application, but I'm having problems with the filter command.

We got to this on Linux:

find ./ -name 'meta.inc.php' -exec grep "<meta name=\"des.*>" {} \; | grep -o "content=\"[^\"]*\"" | grep -Eo "\".*\"" | xargs echo

As you can see, this goes through grep three times to seperate out the relevant text, but I'm having trouble converting this to RunRev. I've tried lots of different ways as I imagined it's the quotes throwing it out so done all that "& quote &" stuff but still to no avail.

Anyone got any ideas? My end result will be a function that will examine the file (or URL) and display all three tags.

If it's tempting, I've got a bit of pocket money to throw at this if anyone can come up with a solution. PM me if you're interested.

Re: Using GREP commands (or maybe not)

Posted: Mon Jan 11, 2010 1:51 pm
by Mark
Hi Andycal,

Since you have the shell syntax already, I think that using the shell() function is the obvious solution.

Best,

Mark

Re: Using GREP commands (or maybe not)

Posted: Mon Jan 11, 2010 1:58 pm
by Andycal
Problem is, we want to run this on Windows so there's no guarantee it'll have grep installed.