Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

paste: line too long error while trying to paste 2 big files.

Status
Not open for further replies.

vysakh1

Programmer
Aug 19, 2002
1
IN
Hi,
I have 2 files each having more than 512 characters per line( say around 1000 characters ). My requirement is to paste these two files and create a 3rd file..

the command I used was

paste file1.txt file2.txt > file3.txt

This gave me an error telling

paste: line too long

I did the same in SunOS 5.8

Is there any other alternate way of doing this

Looking forward for
 
do you have a c-compiler ? do you know c ? i can send you a c-code for your problem.
jm
 
Could you "cat" the files together?

cat file1 file2 > file3

Just a thought....
 
try using nawk
Code:
nawk '{if ((getline a < &quot;-&quot;) > 0) $0 = $0 a; print}' file1 < file2 > file3
CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top