Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] "Windows is Free" stats: reformatted: How to Fish



On 19/08/07, jep200404 <jep200404@example.com> wrote:

> The original was very difficult for me to read.

Well, it was a quick-and-dirty copy-and-paste from the Webalizer HTML
report into my Gmail client. I will pull together real data at the end
of the month and tie it in with the article. Based on the
quick-and-dirty nature of the thing, I think the amount of effort I
put into it was about right.

> Josh Glover wrote [apparently about my reformating]:
>
> > why didn't you [Jim?] post the sed
> > one-liner that you used to do the reformatting?
>
> There was no sed one-liner.

Ah, but there is. Maybe that is why you found it hard to read. The
nice thing about hard tabs is that they are very easy for sed and awk
to determine where the columns are.

>> That would have had the happy side effect of potentially teaching a
man to fish.
>
> You still have that opportunity. Hard tabs are problematic.

# save original email to datapr0n.txt
: jglover@example.com; grep -c '    ' datapr0n.txt  # inside '' is C-v TAB
(literal tab)
54
: jglover@example.com; sed -i -e 's/\t/    /g' datapr0n.txt  # inside ''
is four space chars
: jglover@example.com; grep -c '    ' datapr0n.txt  # inside '' is C-v TAB
(literal tab)
0

-- 
Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links