Dec 5, 2003 #1 afender99 MIS Joined Dec 5, 2003 Messages 7 Location SG hi guys, i got this file with content as follow: abc 123 def 456 lmn 789 my problem is how to reconstruct the content to be like the one shown below abc 123 def 456 lmn 789
hi guys, i got this file with content as follow: abc 123 def 456 lmn 789 my problem is how to reconstruct the content to be like the one shown below abc 123 def 456 lmn 789
Dec 5, 2003 #2 tikual Technical User Joined Jun 10, 2003 Messages 237 Location HK Try it: sed -n "$!N;s/\(^.*\)\n\(.*$\)/\1 \2/p" yourfile tikual Upvote 0 Downvote
Dec 5, 2003 Thread starter #3 afender99 MIS Joined Dec 5, 2003 Messages 7 Location SG hi tikual it works .. thks a lot!! afender99 Upvote 0 Downvote
Dec 5, 2003 #4 Ygor Programmer Joined Feb 21, 2003 Messages 623 Location GB You could also have used paste... paste -s -d' \n' file1 Upvote 0 Downvote