home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / shell / 3463 next >
Encoding:
Text File  |  1992-08-12  |  1.1 KB  |  29 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!jvnc.net!gmd.de!wittig
  3. From: wittig@gmd.de (Georg Wittig)
  4. Subject: Re: csh: escaping "{" and "}" in command substitution
  5. Message-ID: <wittig.713619394@gmd.de>
  6. Sender: news@gmd.de (USENET News)
  7. Nntp-Posting-Host: gmdzi
  8. Organization: GMD, Sankt Augustin, Germany
  9. References: <1992Aug11.202955.24144@afterlife.ncsc.mil>
  10. Date: Wed, 12 Aug 1992 11:36:34 GMT
  11. Lines: 16
  12.  
  13. In <1992Aug11.202955.24144@afterlife.ncsc.mil> ahw@afterlife.ncsc.mil (Andrew White) writes:
  14.  
  15. >foreach name ( names )
  16. >    awk '$1 == /$name/ { print $3 }' somefile
  17. >end
  18.  
  19.     What about the following:
  20.  
  21.     foreach name ( names )
  22.         awk '$1 == /'$name'/ { print $3 }' somefile
  23.     end
  24. --
  25. Georg Wittig                  GMD-I8.IT                                         Schloss Birlinghoven          P. O. Box 1316                                    D-W-5205 Sankt Augustin 1     Germany
  26. email: Georg.Wittig@gmd.de    telephone: (+49) 2241 14-2294
  27.  ------------------------------------------------------------------------------
  28. "In the beginning was the word, but it wasn't a fixed number of bits."
  29.