Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
convert text rows to columns awk
Name: john smith123 Date: April 16, 2006 at 18:02:58 Pacific OS: solaris 2.8 CPU/Ram: 400mhz/500MB
Comment:
Hi,
I have a text file with the data in rows the data file has specfic pattern of rows I need to convert first 3 lines of rows into columns by doing a pattern search below is an example it would be appreciated I need to use shell script awk sed to this.
data file.txt INPUT ---------------
1 john smith I am new to unix 12345/00 x:134 y:23 2 john smith I am new to unix 12345/00 x:134 y:23 3 john smith I am new to unix 12345/00 x:134 y:23 4 john smith I am new to unix 12345/00 x:134 y:23 5 john smith I am new to unix 12345/00 x:134 y:23 ---------- above is the line pattern I want the first started by 1 output to look like this
OUTPUT: john smith i am new to etc. 12345/00 x:13y:23 I would appreciate it if someone can help me out with this small problem. I got far as using awk input field seperate by new line \n and was able to print 3 lines but not in a column format.
Summary: Hi - How can I use awk to take names (i.e. D,Liz W,Frank) listed in one row and display in a column? First and Last Name are seperated by a "," and a space defines each field. Example - Writing a she...
Summary: Hi, I would like to know how to convert a text file in UNIX to HTML using awk? For example, my file has the following contents : Name Age A 23 B 16 C 60 D 29 How to output as ...