home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9436 < prev    next >
Encoding:
Internet Message Format  |  1992-07-26  |  1.2 KB

  1. Path: sparky!uunet!seismo!darwin.sura.net!wupost!usc!sol.ctr.columbia.edu!eff!news.oc.com!convex!tchrist
  2. From: tchrist@convex.COM (Tom Christiansen)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: Bourne shell read command
  5. Message-ID: <1992Jul26.150322.21361@news.eng.convex.com>
  6. Date: 26 Jul 92 15:03:22 GMT
  7. References: <1992Jul24.213654.29656@cs.umb.edu> <1992Jul26.055745.5445@cs.umb.edu>
  8. Sender: usenet@news.eng.convex.com (news access account)
  9. Reply-To: tchrist@convex.COM (Tom Christiansen)
  10. Organization: CONVEX Realtime Development, Colorado Springs, CO
  11. Lines: 20
  12. Originator: tchrist@pixel.convex.com
  13. Nntp-Posting-Host: pixel.convex.com
  14. X-Disclaimer: This message was written by a user at CONVEX Computer
  15.               Corp. The opinions expressed are those of the user and
  16.               not necessarily those of CONVEX.
  17.  
  18. From the keyboard of mzraly@cs.umb.edu (Michael S. Zraly):
  19. :Oh well, its simpler than I thought:
  20. :
  21. :    # this DOES work
  22. :    str=`grep "^$abbrev" $afile`
  23. :    mac=`echo "$str" | awk '{ print $2 }'`
  24. :    dir=`echo "$str" | awk '{ print $3 }'`
  25.  
  26. Process pig. :-)
  27.  
  28.     set $str
  29.     mac=$2
  30.     dir=$3
  31.  
  32. --tom
  33. -- 
  34.     Tom Christiansen      tchrist@convex.com      convex!tchrist
  35.  
  36.  
  37. Emacs is a fine operating system, but I still prefer UNIX. -me
  38.