GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Shell scripting ,a bit of help please (https://gfy.com/showthread.php?t=556499)

kektex 12-25-2005 03:46 PM

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?

kektex 12-25-2005 04:06 PM

Just did it using vim (vi improved,a text editor):
:g/$/s// bye


All times are GMT -7. The time now is 12:39 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123