Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Ronald Newsgroups: comp.sys.acorn.programmer Subject: Re: Better way to check for wget Date: Mon, 01 Feb 2021 12:21:47 +1300 Organization: - Lines: 40 Message-ID: <79acacf758.beeb@-.-> References: <58f473d9b3UCEbin@tiscali.co.uk> Injection-Info: reader02.eternal-september.org; posting-host="e74bb7146c83bee72b9113d611de0c95"; logging-data="9288"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+S5XaAFin5gv25KBkN7TYE" User-Agent: Messenger-Pro/1.00c (MsgServe/1.00a) (RISC-OS/5.28) NewsHound/v1.53 RC2 Cancel-Lock: sha1:oCrrhca4xTit8ZEyPIOMPIYuOks= Xref: csiph.com comp.sys.acorn.programmer:6258 In message <58f473d9b3UCEbin@tiscali.co.uk> "John Williams (News)" wrote: > In article <356d64f458.Kevin@Kevsoft>, > Kevin Wells wrote: > > > I'm implementing in the application BASIC file rather than > > the !Run file, in which I use X wget and send the log into the > > applications scrap file > > You could always send it to null by redirection. > > John > Yes wget { > null: } would quit with 'File 'wget not found' It does run the binary to find out though. OTH it will find an alias also. Ifthere Run:wget Then Else Error wget not found only works for something in the Runpath, but also gives the option for alternative Error msg or alternative Else ... IfThere Run:wget Then Else If "" = "" Then wget { > null: } only trys to run wget in the case of someone not using the standard issue wget app, but fits in the RunPath check first. Bordering on too many conditions for an Obey line, wasn't there an IfNThere available once? I think it is multiple Elses that lose their way. Possibly the 'which' utility would be best, includes modules. but we cant assume that it is installed. Maybe it should be mandatory. On a system with alias's possibly hidden away, the 'which' utility can reduce confusion. Only been looking at obey file options here Ronald May