home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / shell / 3884 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  453 b 

  1. Path: sparky!uunet!mcsun!uknet!bcc.ac.uk!link-1.ts.bcc.ac.uk!ubacw00
  2. From: ubacw00@ucl.ac.uk (Mick Farmer)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: How to do $#a in Bourne shell?
  5. Message-ID: <1992Sep10.152142.4976@bas-a.bcc.ac.uk>
  6. Date: 10 Sep 92 15:21:42 GMT
  7. References: <peter.716085132@merlin>
  8. Organization: Bloomsbury Computing Consortium
  9. Lines: 11
  10.  
  11. Try something like:
  12.  
  13.     echo $a | wc -w
  14.  
  15. To capture the value:
  16.  
  17.     b=`echo $a | wc -w`
  18.  
  19. Regards,
  20.  
  21. Mick
  22.