How To append text in column - Aix

This is a discussion on How To append text in column - Aix ; All, I have a file , which has a single column. I want to append a single text string after each string in the whole column. Tried doing %s/.$/text on vi but this eats away last alphabet on every line. ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: How To append text in column

  1. How To append text in column

    All,

    I have a file , which has a single column. I want to append a single
    text string after each string in the whole column.

    Tried doing %s/.$/text on vi but this eats away last alphabet on every
    line.

    Thankyou

  2. Re: How To append text in column

    In article <0f2592de-6665-4b32-92c8-abe261b3f990@m36g2000hse.googlegroups.com>,
    invincible writes:
    > All,
    >
    > I have a file , which has a single column. I want to append a single
    > text string after each string in the whole column.
    >
    > Tried doing %s/.$/text on vi but this eats away last alphabet on every
    > line.
    >
    > Thankyou


    Maybe nedit helps. It allows "paste column".

  3. Re: How To append text in column

    invincible wrote:
    > I have a file , which has a single column. I want to append a single
    > text string after each string in the whole column.
    >
    > Tried doing %s/.$/text on vi but this eats away last alphabet on every
    > line.


    Yes, because you replaced that last letter.
    Why not

    %s/$/yourtext/

    Yours,
    Laurenz Albe

  4. Re: How To append text in column

    On 24 Apr, 14:53, Laurenz Albe wrote:
    > invincible wrote:
    > > I have a file , which has a single column. I want to append a single
    > > text string after each string in the whole column.

    >
    > > Tried doing %s/.$/text on vi but this eats away last alphabet on every
    > > line.

    >
    > Yes, because you replaced that last letter.
    > Why not
    >
    > %s/$/yourtext/
    >
    > Yours,
    > Laurenz Albe


    Thanyou a lot Laurenz for your help. Its worked Now.:-)

  5. Re: How To append text in column

    On Thu, 24 Apr 2008 05:53:03 -0700 (PDT), invincible
    wrote:

    >All,
    >
    >I have a file , which has a single column. I want to append a single
    >text string after each string in the whole column.
    >
    >Tried doing %s/.$/text on vi but this eats away last alphabet on every
    >line.


    That's because youz are doing something really dumb.

    BWAWAWAWAWAWAWAWAWA!!!!!


  6. Re: How To append text in column

    Since it has been so long I am assuming that you have gotten your answer.
    But a simple way to do this would be with nawk.



    "0xdeadabe" wrote in message
    news:4815daba.95418000@news.motzarella.org...
    > On Thu, 24 Apr 2008 05:53:03 -0700 (PDT), invincible
    > wrote:
    >
    > >All,
    > >
    > >I have a file , which has a single column. I want to append a single
    > >text string after each string in the whole column.
    > >
    > >Tried doing %s/.$/text on vi but this eats away last alphabet on every
    > >line.

    >
    > That's because youz are doing something really dumb.
    >
    > BWAWAWAWAWAWAWAWAWA!!!!!
    >




  7. Re: How To append text in column

    I think you can use comm to do it as well.

    "Lexington_Browns" wrote in message
    news:2ee15$48f93a7a$6215c915$22555@ALLTEL.NET...
    > Since it has been so long I am assuming that you have gotten your answer.
    > But a simple way to do this would be with nawk.
    >
    >
    >
    > "0xdeadabe" wrote in message
    > news:4815daba.95418000@news.motzarella.org...
    >> On Thu, 24 Apr 2008 05:53:03 -0700 (PDT), invincible
    >> wrote:
    >>
    >> >All,
    >> >
    >> >I have a file , which has a single column. I want to append a single
    >> >text string after each string in the whole column.
    >> >
    >> >Tried doing %s/.$/text on vi but this eats away last alphabet on every
    >> >line.

    >>
    >> That's because youz are doing something really dumb.
    >>
    >> BWAWAWAWAWAWAWAWAWA!!!!!
    >>

    >
    >




+ Reply to Thread