From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5997b4b7b514f689 X-Google-Attributes: gid103376,public From: Rex Reges Subject: Re: Reading a line of arbitrary length Date: 1997/02/13 Message-ID: <33033173.6EC9@mds.lmco.com>#1/1 X-Deja-AN: 218520684 References: <5ds40o$rpo@fg70.rz.uni-karlsruhe.de> <01bc18d6$41e00680$188c71a5@dhoossr.iquest.com> <330319F1.41C67EA6@innocon.com> <5dv7ea$epi$1@news.iag.net> To: Ted Dennison Content-Type: text/plain; charset=us-ascii Organization: M&DS Mime-Version: 1.0 Reply-To: rex.r.reges@lmco.com Newsgroups: comp.lang.ada X-Mailer: Mozilla 3.0 (Win95; I) Date: 1997-02-13T00:00:00+00:00 List-Id: Ted Dennison wrote: > > Hmmm. I thought all unix (and VMS) shells had a command-line limit of 256 > characters (or less). Is that not the case? > Your observation is interesting for reasons other than the Get_Line problem. Get_Line can apply to either a file or keyboard input. The file input is where most problems occur. Files can have very long lines (they end when the end-of-line character is encountered which is not necessary an end-of-record). The problem with command line input on Unix is that it does require arbitrarily long string inputs. For example, when the command "grep -i find_me *" is issued, the asterisk must be replaced by the names of all of the files in the current directory before the command is passed to grep. It happens frequently that you may want to search some source code reference directory for with's or whatever. For a medium size job of 100,000 lines of code, this may involve 1000 file names (package specs, package bodies, separates, etc.). The file names tend to get long due to separates, maybe 30 characters average length. The string passed to grep ends up being over 30,000 characters long! Many Unix implementations cannot handle this problem and the grep fails. Obviously with big jobs the problems get even worse. Note that VMS does have a limit of 255 or so as you stated, but you can tack on quite a few continuation lines. Maybe the overall limit is 4095? -- Rex Reges or you can call me The Fixer Systems Analyst or you can call me The Lawyer Lockheed Martin, M&DS or you can call me The Doctor (610)354-5047 or you can call me Rexasaurus