Re: HOST(' ');

From: <Lance.Humpert_at_mail.tju.edu>
Date: 1996/08/02
Message-ID: <177D7BA98.ASVLH_at_TJUVM.TJU.EDU>#1/1


Joseph C Huang writes:  

> I was reading this Newsgroup and saw the usage of HOST(' '); to execute
> commands from UNIX via SQL.
> Typing in, say, HOST('ls'); works and displays the contents of the directory.
> However, typing in, say, HOST('ls -l'); , or any command with paramters,
> does not work and displays the following:
> ls -l: Command not found
 

The above syntax for the host command was most likely given in reference to a SQL*Forms question. I think someone was trying to execute a shell script from within a form. I tried the same thing that you describe in SQL*Plus, and got the exact same results.  

> How do I get HOST to work with parameters?
 

As the other respondent indicated, if you are working from a command prompt inside SQL*Plus, the parens and single quotes are unnecessary. Additionally, the 'host' command can be abbreviated 'ho':  

SQL> ho pr -fl64 query.out | lp -d myprinter request id is myprinter-999 (standard input)  

SQL> ho rm query.out  

  • Lance (hope this clears up any confusion)
Received on Fri Aug 02 1996 - 00:00:00 CEST

Original text of this message