Row manipulation with awk
Hi guys,
I want to move (cut) the second row onto the first using awk. I show you what I mean: test test1 Basically, I want to move "test1" next to "test" test test1 Cheers, Sam |
To get the right logic, you need to show more of the file content. e.g. will you do the stated action ONLY when you find "test" on one line?
If it is that simple, then: Code:
sed '/^test$/{N;s/\n/ /}' filename > newfilename |
All times are GMT -5. The time now is 11:23 AM. |