Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!dri500!slootman From: slootman@dri.nl (Paul Slootman) Newsgroups: comp.unix.shell Subject: Positional parameters beyond $9 Message-ID: <991@dri500.dri.nl> Date: 16 Apr 91 08:07:23 GMT Organization: DataCount Register Informatici, Wierden, The Netherlands Lines: 28 Hi, I've just come across a detail of (Bourne) shell programming that I've not seen before. If a script has more than 9 positional parameters, there seems to be no way to *directly* access the tenth onwards. Try this: $ set a b c d e f g h i j k l m n o p $ echo $9 i $ echo $10 a0 $ echo ${10} sh: bad substitution Is this a "feature"? The ksh does it ok, but that's not an option for all the systems we have here. We've done a workaround by assigning to other variables and shifting, but I was wondering if there isn't any other way. Nothing in TFM states anything about problems with more than 9 parameters (unless I've overlooked it...) FYI, it's on System V systems. Paul. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= : slootman@dri.nl : You are wise, witty and wonderful, but you : : ...!hp4nl!dri500!slootman : spend too much time reading this sort of trash. : =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=