Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!UMIX.CC.UMICH.EDU!dwv%cadnet From: dwv%cadnet@UMIX.CC.UMICH.EDU (Doug Vander Wilt) Newsgroups: comp.sys.apollo Subject: AEGIS shell argument processing Message-ID: <9106122153.AA06077@cadnet.micro.honeywell.com> Date: 12 Jun 91 21:53:03 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 25 After many years programming with the AEGIS shell (/com/sh) I wonder if I'm missing out on some easier argument processing methods. Is there a "shift" style command to shift arguments left? I haven't had any success referring to them with a variable index, e.g.: ^0 ^1 .. ^^n I currently use the following form to process an unknown number of shell arguments, but it won't properly handle quoted arguments: (e.g.: $ argtest a 'b c' d ) #!/com/sh # ARGTEST - test shell script arguments eon n := 0 args !* | while readln arg do n := ^n + 1 args (("Argument " + ^n + ": " + ^arg)) enddo BTW: the AEGIS shell is limited to 128 arguments (from: $ help limits) which is 127 arguments not counting ((^0)) if you're interested. Doug Vander Wilt Sr. CAD/CAM Engineer Honeywell MICRO SWITCH Division dwv@cadnet.micro.honeywell.com