🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Tim Lengel Thu, 18 Apr 1996 00:01
Re: Making "Echo Off" silent. (FAQ?)
#4743
Author: Tim Lengel
Date: Thu, 18 Apr 1996 00:01
43 lines
1892 bytes
In <4l31ae$4c@nntp.ucs.ubc.ca>, on 04/17/96 at 03:04 PM,
   keith@MYELIN.MSMRI.MED.UBC.CA said:

>I am calling several OS/2 commands from a REXX script.  I can
>keep the command from echoing to the screen before running by
>adding the "ECHO OFF" command near the beginning of the
>REXX script.  Unfortunately, the "ECHO OFF" command itself is
>echoed.

>I have tried "@echo off" with no success.  I have also looked at the FAQ
>and a couple of REXX books, again with no success.  Any suggestions?


Make sure the @echo off is in single quotes.  Rexx will return an error if
it is not.

/* Example */
'@echo off'
'dir'
'cd .'
'dir'

Explanation: If Rexx doesn't recognize a string as a command on a line it
replaces it with the value it contains, and passes it to the command
processor.  But if the echo and off variables haven't been assigned they
return the strings ECHO and OFF respectively and send the command "ECHO OFF"
to the command processor(and your first command works).  Also, Rexx
considers @ an invalid character so it gives a syntax error so your second
command would fail.  So, this would also do what you want:

echo = '@echo'
echo off

>Thanks in advance.

>Keith S Cover

--
-----------------------------------------------------------
Tim Lengel (tim@secant.com)
Software Engineer
Secant Technologies, Inc.             http://www.secant.com
-----------------------------------------------------------
Re: Making "Echo Off" silent. (FAQ?)
#4757
Author: gnorr
Date: Thu, 18 Apr 1996 22:56
24 lines
1493 bytes
In <9604172301.AA0506@secant.com>, Tim Lengel <tim@SECANT.COM> writes:
>In <4l31ae$4c@nntp.ucs.ubc.ca>, on 04/17/96 at 03:04 PM,
>   keith@MYELIN.MSMRI.MED.UBC.CA said:
>
-snip-
>>I have tried "@echo off" with no success.  I have also looked at the FAQ
>>and a couple of REXX books, again with no success.  Any suggestions?
>
>
>Make sure the @echo off is in single quotes.  Rexx will return an error if
>it is not.
-snip-

It doesn't matter if the quotes are single or double. Either are valid string
delimiters. "@echo off" is exactly equivalent to '@echo off' and neither are
equivalent to @echo off unless the variable @echo has been set to @echo 
(lower case) and the variable off has been set to off (lower case). Any 
problems along these lines will be found very quickly if SIGNAL ON NOVALUE 
is added at the start of your program: it will force you to use properly 
quoted strings where you ought to.


====== Graham C. Norris ========= Graham_Norris@candle.com =======
====== Opinions expressed here are not those of my employer ======
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads