![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| contactenate columns from multiple files | coolnaps | Shell Programming and Scripting | 2 | 05-03-2008 07:01 PM |
| merging multiple log files | jack1981 | Shell Programming and Scripting | 3 | 10-03-2006 09:50 AM |
| Compare multiple columns between 2 files | stevesmith | Shell Programming and Scripting | 15 | 09-20-2006 01:04 PM |
| Extracting columns from different files for later merging | kingkong | UNIX for Dummies Questions & Answers | 2 | 11-23-2005 03:21 AM |
| merging few columns of two text files to a new file | kolvi | Shell Programming and Scripting | 4 | 09-15-2005 05:34 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Merging columns from multiple files in one file
Hi,
I want to select columns from multiple files and combine them in one file. The files are simulation-data-files with 23 columns each and about 50 rows. I now use: Code:
cut -f 11 Sweep?wing-30?scale=0.?0?fan2?.txt | pr -3 | awk '{printf("\n%s\t%s\t%s",$1,$2,$3)}' > ../Data_Processed/output.txt
Sweep|wing-30|scale=0.30|fan2|.txt Sweep|wing-30|scale=0.50|fan2|.txt Sweep|wing-30|scale=0.70|fan2|.txt, put them in 3 columns with pr -3 (instead of having all the columns joined underneath each other) and than use awk again to make the formatting tab-delimited. It seems to me that there might be an easier solution to merge these files. One that only uses awk and getline maybe? And automatically format and for variable number of input files? regards. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|