home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / perl / 7975 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  738 b 

  1. Path: sparky!uunet!olivea!inews.Intel.COM!ilx018.intel.com!ilws14!steed
  2. From: steed@ilws14.intel.com (Ze'ev Shtadler)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: How to do commas in sed,awk or C
  5. Message-ID: <1jv2u3INN18g6@ilx018.intel.com>
  6. Date: 24 Jan 93 21:49:55 GMT
  7. References: <1993Jan23.115142.27369@zooid.guild.org>
  8. Reply-To: steed@iil.intel.com (Ze'ev Shtadler)
  9. Organization: Intel Corporation
  10. Lines: 8
  11. NNTP-Posting-Host: ilws14.intel.com
  12.  
  13. The loop can be done using sed's `t' command:
  14.  
  15. sed -e ':l' -e 's/\(.*[0-9]\)\([0-9][0-9][0-9]\)/\1,\2/' -e 't l'
  16. -- 
  17. Ze'ev "Steed" Shtadler, Design Technology, IDC2-41,
  18. INTeL Israel, P.O. Box 1659, Haifa 31015, ISRAEL.
  19. steed@iil.intel.com    Work: +972-4-355935    FAX: +972-4-355666
  20. iNET: 8-435-5935
  21.