Given an HTML file which looks like this:
- begin snippet -
HTML
HEAD
TITLE
We've Lied to You#8230;/TITLE
META
NAME=GENERATOR
CONTENT=Modular DocBook HTML Stylesheet Version 1.79LINK
REL=HOME
TITLE=Maximum RPM
HREF=index.htmlLINK
REL=UP
TITLE=Using RPM to Verify Installed
On 12/30/2010 8:19 AM, ken wrote:
Given an HTML file which looks like this:
- begin snippet -
HTML
HEAD
TITLE
We've Lied to You#8230;/TITLE
META
NAME=GENERATOR
CONTENT=Modular DocBook HTML Stylesheet Version 1.79LINK
REL=HOME
TITLE=Maximum RPM
HREF=index.htmlLINK
On 12/30/2010 09:18 AM Bowie Bailey wrote:
On 12/30/2010 8:19 AM, ken wrote:
Given an HTML file which looks like this:
- begin snippet -
HTML
HEAD
TITLE
We've Lied to You#8230;/TITLE
META
NAME=GENERATOR
CONTENT=Modular DocBook HTML Stylesheet Version 1.79LINK
REL=HOME
From: ken geb...@mousecar.com
Some file this script would need to process could very well be
ridiculously huge, which is why I chose to process line-by-line.
Secondly, yes, I was already using the general strategy of taking out
the newlines (where they're misplaced) and then putting them
On 12/30/2010 10:24 AM, ken wrote:
On 12/30/2010 09:18 AM Bowie Bailey wrote:
On 12/30/2010 8:19 AM, ken wrote:
Given an HTML file which looks like this:
- begin snippet -
HTML
HEAD
TITLE
We've Lied to You#8230;/TITLE
META
NAME=GENERATOR
CONTENT=Modular DocBook HTML
Not sure exactly what you are trying to do, but Tie::File might be worth
a look at if you haven't done so already?
Sean
ken wrote:
Given an HTML file which looks like this:
- begin snippet -
HTML
HEAD
TITLE
We've Lied to You#8230;/TITLE
META
NAME=GENERATOR
John Doe wrote:
$ cat $FILE | tr \n | sed 's/ */\n/g'
I was yearning for someone to chime with that!
sed is clearly the best most straightforward way to do
this task.
I can't help myself - there's a useless use of cat:
$ $FILE tr \n | sed 's/ */\n/g'
On 12/30/2010 11:01 AM John Doe wrote:
From: ken geb...@mousecar.com
Some file this script would need to process could very well be
ridiculously huge, which is why I chose to process line-by-line.
Secondly, yes, I was already using the general strategy of taking out
the newlines (where
On Thu, Dec 30, 2010 at 08:19:00AM -0500, ken wrote:
It isn't perl, but does 'tr' exist in CentOS (it does in FreeBSD)?
It would do it.
jerry
Given an HTML file which looks like this:
- begin snippet -
HTML
HEAD
TITLE
We've Lied to You#8230;/TITLE
META
On Thu, Dec 30, 2010 at 5:19 AM, ken geb...@mousecar.com wrote:
- begin snippet -
while ($in)
{
s/(\w*\W)/\L$1/g; # Downcase XXX in XXX.
s/\/(\w*\W)/\/\L$1/g; # Downcase XXX in /XXX.
chomp; # Always remove the newline
unless (/html/) {
# Not on first
(Drat, keyboard glitch caused that to be sent before I was finished.)
On Thu, Dec 30, 2010 at 5:19 AM, ken geb...@mousecar.com wrote:
- begin snippet -
while ($in)
{
s/(\w*\W)/\L$1/g; # Downcase XXX in XXX.
s/\/(\w*\W)/\/\L$1/g; # Downcase XXX in /XXX.
Oops again, typo:
s/^(^[])/\n$1/;
Should be s/^([^])/\n$1/
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12 matches
Mail list logo