Mailing List Archive
tlug.jp Mailing List tlug archive tlug 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
- Date: Sun, 19 Aug 2007 21:21:58 -0700 (PDT)
- From: tlug@example.com
- Subject: Re: [tlug] "Windows is Free" stats: reformatted: How to Fish
- References: <d8fcc0800708181927j5748b11bs7474287ccec91cc8@mail.gmail.com> <20070818230057.1c5dd41e.jep200404@columbus.rr.com> <d8fcc0800708182230y1d4f407dq3e05607f3d194ed6@mail.gmail.com> <20070819095717.7b303459.jep200404@columbus.rr.com> <d8fcc0800708191925p1581af24uf827ffe72d4318cf@mail.gmail.com>
- User-agent: SquirrelMail/1.4.10a
> On 19/08/07, jep200404 <jep200404@example.com> wrote: > Based on the quick-and-dirty nature of the thing, I think > the amount of effort I put into it was about right. I agree with this. I am just replying in order to correct some technical misconceptions. > 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. Actually, there is not. [1] The thing you forgot about here is that data delimited with tabs is usually displayed with aligned columns, which is what is desired in this case. A tab is not simply represented as a given number of spaces; it is displayed as a series of spaces up until the next "tab stop." This a good application for awk, since it works with columns of data, but it is still not a one-liner since there are multiples tables of data in the message. > : jglover@example.com; sed -i -e 's/\t/ /g' datapr0n.txt # inside '' This command results in output that is not aligned. Cheers, Travis [1] Note that it is not possible to use a single (extended) regular expression to reformat the tables with optimal spacing for each column, which is the case of the data in question. It would be possible, however, if one were to specify a fixed column width for all columns. Note that such a solution would have to be an extended regular expression (with backreferences) and would not be solvable using a regular expression or equivalent FSM.
- Follow-Ups:
- Re: [tlug] "Windows is Free" stats: reformatted: How to Fish
- From: steven smith
- References:
- [tlug] "Windows is Free" stats
- From: Josh Glover
- Re: [tlug] "Windows is Free" stats: reformatted
- From: jep200404
- Re: [tlug] "Windows is Free" stats: reformatted
- From: Josh Glover
- Re: [tlug] "Windows is Free" stats: reformatted: How to Fish
- From: jep200404
- Re: [tlug] "Windows is Free" stats: reformatted: How to Fish
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Total operational cost... hard stats anywhere?
- Next by Date: Re: [tlug] Total operational cost... hard stats anywhere?
- Previous by thread: Re: [tlug] "Windows is Free" stats: reformatted: How to Fish
- Next by thread: Re: [tlug] "Windows is Free" stats: reformatted: How to Fish
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links