Shell scripting ,a bit of help please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kektex
    Confirmed User
    • Mar 2005
    • 1813

    #1

    Shell scripting ,a bit of help please

    Hi,
    I`ve got a text file and what I want to do is add a certain text string to the end of each line.
    Say for example my text file looks like this:
    Hello line1
    Hello line2
    Hello line3
    ...

    And I want to add the string "Bye" to the end of each line:
    Hello line1 Bye
    Hello line2 Bye
    Hello line3 Bye
    ...

    I am pretty sure there has to be a way of doing this with a bash script but I`ve trying to find out how and I cannot get it.Can someone give me a hand?
    exgfmovies.com, exgfclips.com, datesx.com, gayboards.com and more!
  • kektex
    Confirmed User
    • Mar 2005
    • 1813

    #2
    Just did it using vim (vi improved,a text editor):
    :g/$/s// bye
    exgfmovies.com, exgfclips.com, datesx.com, gayboards.com and more!

    Comment

    Working...