![]() |
|
|
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 |
| alternative for head command | nikhilneela | UNIX for Dummies Questions & Answers | 2 | 02-19-2009 08:39 AM |
| head command wont work on MF file | alfredo123 | UNIX for Dummies Questions & Answers | 10 | 03-04-2007 10:23 AM |
| head command | sumesh.abraham | Shell Programming and Scripting | 6 | 02-23-2007 10:21 AM |
| Simple Command (head) Question | jbud | UNIX for Dummies Questions & Answers | 4 | 04-23-2006 10:16 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
head command with more than one file
Hi, I have the following problem. I have files with one column of data (let's say file1.dat, file2.dat...file6.dat), and I would like to record the first value of the column of each file into another file (let's name it fileall.dat), which would have the the six values, one in each column. I use to do it as follows,
head --lines=1 file_i.dat >> record_i.dat with i={1,...,6}, and then, I pasted all with paste -d" " record_1.dat record_2.dat ... record_6.dat > fileall.dat and then I had the 6 first values of each data file column together in one file. Is there any way to do it all in one step? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|