home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3779 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.1 KB

  1. Path: sparky!uunet!infoserv!incc!jerry
  2. From: jerry@incc.com (Jerry Rocteur)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: Awk question
  5. Summary: awk getline function
  6. Message-ID: <119.30995@incc.com>
  7. Date: 2 Sep 92 18:32:06 GMT
  8. References: <BtxLJ3.BzE@nntp-sc.Intel.COM>
  9. Organization: InCC.com Perwez Belgium
  10. Lines: 20
  11.  
  12. In article <BtxLJ3.BzE@nntp-sc.Intel.COM>, brodesky@td2cad.intel.com (Michael Brodesky) writes:
  13. > I would like to get the current year into my awk program. Any
  14. > clues into doing this?
  15. awk ' BEGIN { "date +%y" | getline da}'
  16.  
  17.  
  18. da now contains the output from your date program.
  19.  
  20. Look at your manual for date to see what your options are??
  21.  
  22. -- 
  23.  __^__                                                              __^__
  24. ( ___ )------------------------------------------------------------( ___ )
  25.  | / | Jerry Rocteur                       Email: jerry@InCC.COM    | \ |
  26.  |___|             Independent Computer Consultants                 |___|
  27. (_____)------------------------------------------------------------(_____)
  28.    ^                                                                  ^
  29.