home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!spool.mu.edu!olivea!sgigate!odin!sam.wpd.sgi.com!pj
- From: pj@sam.wpd.sgi.com (Paul Jackson)
- Newsgroups: comp.sys.sgi
- Subject: Re: Nawk Balks again
- Message-ID: <1992Nov17.024412.1607@odin.corp.sgi.com>
- Date: 17 Nov 92 02:44:12 GMT
- References: <34092@adm.brl.mil>
- Sender: news@odin.corp.sgi.com (Net News)
- Reply-To: pj@sgi.com
- Organization: Silicon Graphics, Research & Development
- Lines: 19
- Nntp-Posting-Host: sam.wpd.sgi.com
-
- In article <34092@adm.brl.mil>, karron@karron.med.nyu.edu (Dan Karron (karron@nyu.edu)) writes:
- |>
- |> More nawk bugs. Try this. Note that the
- |> string should contain the string value of "001", not "".
- |>
- |> i = 1; ...
- |> sprintf(string,"%03d",i);
- |> print "string=",string
-
- I think you're missusing sprintf. The following works, and
- follows the sprintf usage explained in the AWK book:
-
- string=sprintf("%03d",i);
-
- --
-
- I won't rest till it's the best ...
- Software Production Engineer
- Paul Jackson (pj@sgi.com), x1373
-