Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!comp.vuw.ac.nz!actrix!templar!jbickers From: jbickers@templar.actrix.gen.nz (John Bickers) Newsgroups: comp.sys.amiga.advocacy Subject: Re: Script bits Message-ID: <11231.tnews@templar.actrix.gen.nz> Date: 15 Feb 91 01:01:38 GMT References: <18ac1a05.ARN2ae4@prolix.pub.uu.oz.au> <1991Feb13.013917.22130@sugar.hackercorp.com> <1991Feb13.053854.12419@mintaka.lcs.mit.edu> Organization: TAP, NZAmigaUG. Lines: 40 Quoted from <1991Feb13.053854.12419@mintaka.lcs.mit.edu> by rjc@geech.ai.mit.edu (Ray Cromwell): > In article <1991Feb13.013917.22130@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes: > > segList = LoadSeg(...); > > if(segList == INVALID) > > load_script(...); > if(not_a_script) WhatIsIt(); > How do we tell the difference between Arexx scripts, shell scripts, > CSH scripts, TCL scripts, etc? Let the shell figure it out, like WShell does. The OS should only really have one script language (if that), though the reality is that the 1st one proved insufficient, and now we have a 2nd, it's too late to throw away the 1st. > did with $VER:. Why? I think it would be neat if the shell could help the > user more like 'File is Text, not a script, want to read it? ' Programs do exist that do this job, to some extent. Programs have the hunk format, IFF files have the various IFF headers, ARexx scripts have /*, AmigaDOS scripts have the script bit. It isn't that hard to type two characters before a filename to do something with it, though (and in terms of file completion it's faster to scan an argument word than it is a command word, eg: on my machine "lh" expands to "lharc" much slower than "m x" expands to "m xmas.pic"). So a simple "whatis" sort of program could be a practical solution to any filetype problems. Some problems with scanning .info files are: x Some of us use shells to avoid a proliferation of .infos. x Current software could require messing with arguments. -- *** John Bickers, TAP, NZAmigaUG. jbickers@templar.actrix.gen.nz *** *** "Patterns multiplying, re-direct our view" - Devo. ***