![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| paste several files | tonet | Shell Programming and Scripting | 1 | 10-05-2007 07:08 AM |
| paste 2 files ( it is possible???) | mig28mx | UNIX for Dummies Questions & Answers | 3 | 06-21-2007 08:51 AM |
| Paste the files contents differently | er_aparna | Shell Programming and Scripting | 1 | 05-16-2007 01:29 AM |
| Need a Help with paste 2 files since the output is not what i want | alexcol | Shell Programming and Scripting | 3 | 01-09-2007 12:47 AM |
| awk or sed or paste | leprichaun | UNIX for Dummies Questions & Answers | 3 | 11-16-2003 03:58 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
1. How can I get around the issue with pasting more than 12 files together? 2. paste file1 file2 > file3........how can I do this with awk?? Thanks! |
| Forum Sponsor | ||
|
|
|
|||
|
Friends:
Solution 1 is ok. I am more interested in syntax using AWK to replace PASTE or other paste option to allow me to paste more than 12 files. paste limit of only 12 files. Solution 2 is not working. Please provide code. I tried it (zsh) not working. Thanks! |
|
||||
|
||||
|
Hi.
There is a perl version of paste at PPT: paste This test script: Code:
#!/bin/bash -
# @(#) s1 Demonstrate paste written in perl, Perl Power Tools Suite.
echo
echo "(Versions displayed with local utility \"version\")"
version >/dev/null 2>&1 && version =o $(_eat $0 $1)
set -o nounset
N=${1-15}
FILE1=data1
FILE2=data${N}
echo
echo " Sample: data file $FILE1:"
cat $FILE1
echo
echo " Sample: data file $FILE2:"
cat $FILE2
files=$( echo data? ; echo data?? )
echo
echo " Results:"
./paste.perl -d " " $files
exit 0
Code:
$ ./s1 (Versions displayed with local utility "version") SunOS 5.10 GNU bash 3.00.16 Sample: data file data1: 1.1 1.2 Sample: data file data15: 15.1 15.2 Results: 1.1 2.1 3.1 4.1 5.1 6.1 7.1 8.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 1.2 2.2 3.2 4.2 5.2 6.2 7.2 8.2 9.2 10.2 11.2 12.2 13.2 14.2 15.2 |
|
|||
|
friends:
Thank you for the replies. After look at all the replies, I think I din't make my questions clear. Here, it is again: I have 13 files of data. file1 cat fiel1 1 file2 cat file2 2 file3 cat file3 3 file4 cat file4 4 file5 cat file5 5 file6 cat file6 6 file7 cat file7 7 file8 cat file8 8 file9 cat file9 9 file10 cat file10 10 file11 cat file11 11 file12 cat file12 12 file13 cat file13 13 paste file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 file11 file12 1 2 3 4 5 6 7 8 9 10 11 12 paste file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 file11 file12 file13 limit 12 files only QUESTION: how can I paste these 13 files together? I want my results: 1 2 3 4 5 6 7 8 9 10 11 12 13 can this be done with awk,sed,per,......or......? Any taker! Thanks! |
|||
| Google UNIX.COM |