The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
aix printing problem aboharb17 AIX 0 02-11-2009 07:14 AM
Printing Formatted Records From A File Silentwolf Shell Programming and Scripting 3 09-03-2008 03:31 AM
Printing problem alfredo HP-UX 2 03-27-2008 05:25 AM
Generating a report -Formatted printing -Urgent jisha Shell Programming and Scripting 1 01-10-2008 02:59 AM
printing Problem 744eagle UNIX for Dummies Questions & Answers 2 05-18-2005 02:51 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-21-2009
PHL PHL is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 4
Problem with formatted printing in AWK

Hi,

I want to print 130 fileds using formatted printing in AWK. It looks like

awk '{printf ("%7.2f%7.2f...%7.2\n",$1,$2,...,$130)}' inflie>oufile

But it gives me an error:
Word too long!

Can you please help me with this? Is there another way to do this?
  #2 (permalink)  
Old 10-21-2009
scottn scottn is offline Forum Advisor  
VIP Member
  
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,113
Hi.

You could try splitting the printf statements over multiple statements, with the \n in the final one:


Code:
printf ("....", ..... )
printf ("....", ..... )
printf ("....\n", ..... )

Or maybe using gawk or nawk will help?
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0