home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / sgi / 16472 < prev    next >
Encoding:
Text File  |  1992-11-16  |  908 b   |  31 lines

  1. Path: sparky!uunet!gatech!news.ans.net!cmcl2!adm!news
  2. From: karron@karron.med.nyu.edu (Dan Karron (karron@nyu.edu))
  3. Newsgroups: comp.sys.sgi
  4. Subject: Nawk Balks again
  5. Message-ID: <34092@adm.brl.mil>
  6. Date: 15 Nov 92 23:50:56 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 21
  9.  
  10.  
  11. More nawk bugs. Try this. Note that the 
  12. string should contain the string value of "001", not "".
  13.  
  14. Try this at home and see:
  15.  
  16. prog='
  17. BEGIN {
  18.       i=1
  19.       printf("%03d\n",i);
  20.       sprintf(string,"%03d",i);
  21.       print "string=",string
  22.       }
  23. '
  24. nawk "$prog"
  25. | karron@nyu.edu (e-mail alias )         Dan Karron, Research Associate      |
  26. | Phone: 212 263 5210 Fax: 212 263 7190  New York University Medical Center  |
  27. | 560 First Avenue                       Digital Pager  <1>  212 397 9330    |
  28. | New York, New York 10016               <2> 10896   <3> <your-number-here>  |
  29. ``Too busy doing to write about it, too busy writing to do anything about it.''
  30.  
  31.