Using GREP commands (or maybe not)
Posted: Mon Jan 11, 2010 12:48 pm
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.
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.