home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / shell / 3875 < prev    next >
Encoding:
Text File  |  1992-09-09  |  941 b   |  20 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!convex!news.utdallas.edu!corpgate!bnrgate!nrcnet0!cunews!torn!csd.unb.ca!morgan.ucs.mun.ca!nstn.ns.ca!dragon.acadiau.ca!merlin!peter
  3. From: peter@merlin.acadiau.ca (Peter Steele)
  4. Subject: How to do $#a in Bourne shell?
  5. Message-ID: <peter.716085132@merlin>
  6. Sender: news@dragon.acadiau.ca
  7. Nntp-Posting-Host: merlin
  8. Organization: Acadia University
  9. Date: Thu, 10 Sep 1992 00:32:12 GMT
  10. Lines: 8
  11.  
  12. If I have a list in Bourne shell, how can I determine how many
  13. elements are in, short of write a for loop and counting them?
  14. Bourne shell doesn't seem to have C shell's $#variable construct.
  15. It doesn't seem to support array indexing either, although I'm just
  16. learning it and I might be missing something....
  17. --
  18. Peter Steele        Unix Services Manager            peter.steele@acadiau.ca 
  19. Acadia Univ., Wolfville, NS, Canada B0P 1X0  902-542-2201  Fax: 902-542-4364
  20.