How could i add to the beginning of line word?
Hi i whould like to add different word of each line
Example: bla bla bla fast bla bla bla slow bla bla bla typical bla bla the result should be... kuku1 bla bla bla fast kuku2 bla bla bla slow bla kuku3 bla bla typical bla bla Thanks. |
Maybe you should concentrate more on describing what you want to achieve and less on "bla bla bla". Assuming that you want to insert a fixed string followed by the line number, you could try
Code:
awk '{print "kuku" NR $0;}' |
or ...
sed 's/^/kuku1 /' i'm tired - this solution doesn't solve the problem. Sorry. |
Code:
IFS=" |
...
what i mean is when the word fast show i want at the first line the word kuku1
Example: bla bla bla fast bla bla bla slow bla bla bla typical bla bla bla bla slow bla typical bla bla bla the result should be... kuku1 bla bla bla fast kuku2 bla bla bla slow bla kuku3 bla bla typical bla bla kuku2 bla bla slow kuku3 typical bla bla bla Thanks. |
And that is, of course, something entirely different. Basically:
Code:
sed '/fast/ s/^/kuku1 /; /slow/ s/^/kuku2 /;' |
Quote:
|
All times are GMT -5. The time now is 05:31 AM. |