home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / bash / bug / 565 < prev    next >
Encoding:
Text File  |  1992-08-21  |  1.1 KB  |  39 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!iowa.UUCP!kburton
  3. From: kburton@iowa.UUCP (Kevin Burton)
  4. Subject: Arguments for subroutines
  5. Message-ID: <9208211821.AA02760@iowa.YP.solsys>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Fri, 21 Aug 1992 18:21:18 GMT
  10. Approved: bug-bash@prep.ai.mit.edu
  11. Lines: 26
  12.  
  13. I have bash-1.12 and am trying to convert some CSH aliases to subroutines
  14. in bash. I want to be able to get at all of the arguments from a specified
  15. argument on (like !:3* in CSH).
  16.  
  17. foo ()
  18. {
  19.     echo $1;
  20. # This of course does not work but I want to be able to do something
  21. # like this.
  22.     echo $2*;
  23. }
  24.  
  25. I have looked on the info pages and found very little documentation at all
  26. on these "subroutines".
  27.  
  28. Does anyone know how I might do this ? Do I have to concatenate all the the
  29. arguments manually ? I hope not :-(
  30.  
  31. Thank you.
  32.  
  33. -
  34. Kevin Burton
  35. Noran Instruments                voice: (608) 831-6511 x317
  36. 2551 West Beltline Highway, Room 532          FAX: (608) 836-7224
  37. Middleton, WI 53562                email: kburton@noran.com
  38.  
  39.