Re: awk printf question

From: Bruce Zimmer (b.r.zimmer@WORLDNET.ATT.NET)
Date: Thu Feb 19 2004 - 08:05:41 EST


cat /etc/netsvc.conf| awk '{ print $0 }
END {printf
"%65s%65s%65s%65s%65s%65s%65s%65s%65s%65s","N","N","N","N","N","N","N","N","
N","N"}'

Bruce Zimmer
Central Data Systems
(248) 615-4644 (direct)
(248) 320-1175 (cell)
bzimmer@centraldata.com

NOTICE:

The information contained in the above message is privileged and
confidential information solely for the use of the intended recipient. If
the reader of this message is not the intended recipient, the reader is
notified that any use, dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please immediately notify CDS @ 248-478-7000.

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of John
Dunn
Sent: Thursday, February 19, 2004 7:01 AM
To: aix-l@Princeton.EDU
Subject: awk printf question

Hi all

I am writing a record to a file in awk using printf.

At the end of the record I need to add 10 occurrences of a 65 character
string that consists of 64 spaces followed by the letter "N".
650 characters in all.

Is there an easy way to code this?
Obviously if it was 650 spaces that would not be a probelm, but I have to
include the "N" characters.

John



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:37 EDT