HP3000-L Archives

August 1999, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tad Bochan <[log in to unmask]>
Reply To:
Date:
Thu, 26 Aug 1999 20:37:45 +0200
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (1005 bytes) , text/plain (3384 bytes)



Hi Tom,

The difficulty comes when the variable containing the pipe symbols
comes from from a file, perhaps via an 'input' command.
In which case, you need to do as follows,

  ECHO ![repl(repl(recbuf,"<","!<"),">","!>")]

Cheers,
Tad.

Tom wrote:-



-----------------------------------------------------------------------------
This message is confidential; its contents do not constitute a
commitment by Paribas except where provided for in a written agreement
between you and Paribas. Any unauthorised disclosure, use or
dissemination, either whole or partial, is prohibited. If you are not
the intended recipient of the message, please notify the sender
immediately.

Ce message est confidentiel ; son contenu ne représente en aucun cas un
engagement de la part de Paribas sous réserve de tout accord conclu par
écrit entre vous et Paribas. Toute publication, utilisation ou
diffusion, même partielle, doit être autorisée préalablement. Si vous
n'êtes pas destinataire de ce message, merci d'en avertir immédiatement
l'expéditeur.


As stated in the "Command Interpreter Access and Variables Programmers Guide", Chapter 8; Command Input/Output Redirection (CIOR), the following applies to the use of the '>', '>>', and '<' in variables and command files: ¯------------------------------------------------------------------------------------------------------------------- Escaping Redirection If, for any reason, you want to use the IO redirection indicators <,> or >> without having them function as such, you can precede them with the ! sign. For example, suppose you wanted to construct a command file to explain how to use I/O redirection which contained the following echo command:      echo To redirect $STDLIST use the construct, >filename. This would cause filename to be a newly-created, temporary file containing the string preceding it. To prevent this from happening, insert ! before >filename, as follows:      echo To redirect $STDLIST use the construct !>filename The resulting display would be:      To redirect $STDLIST use the construct >filename The ! can be used in the same way to escape the other redirection indicators (< and >>) also. ¯--------------------------------------------------------------------------------------------------------------- No need to write a COBOL program. Tom Renz Internet De : [log in to unmask] le 26/08/99 17:52 GMT Pour : HP3000-L cc : ccc: Tad BOCHAN Objet : Re: ci programming question As stated in the "Command Interpreter Access and Variables Programmers Guide", Chapter 8; Command Input/Output Redirection (CIOR), the following applies to the use of the '>', '>>', and '<' in variables and command files: ¯------------------------------------------------------------------------------------------------------------------- Escaping Redirection If, for any reason, you want to use the IO redirection indicators <,> or >> without having them function as such, you can precede them with the ! sign. For example, suppose you wanted to construct a command file to explain how to use I/O redirection which contained the following echo command:      echo To redirect $STDLIST use the construct, >filename. This would cause filename to be a newly-created, temporary file containing the string preceding it. To prevent this from happening, insert ! before >filename, as follows:      echo To redirect $STDLIST use the construct !>filename The resulting display would be:      To redirect $STDLIST use the construct >filename The ! can be used in the same way to escape the other redirection indicators (< and >>) also. ¯--------------------------------------------------------------------------------------------------------------- No need to write a COBOL program. Tom Renz >>> Lars Appel <[log in to unmask]> 08/26/99 11:18AM >>> Glenn warned... >As Stan pointed out, that doesn't always work. Before I posted >the command file, I tested it :) with something like > > :test "this is a test so > there" > >When I tried > > echo !stf_final > >it put a string in a temp file called "there" courtesy of the ">" above. >While this feature can be useful, it can also be a real hassle. I never >remember how to get around this, so instead of playing with it, I cheated >by using showvar. :) I'd probably write a small COBOL program (or whatever language of choice) that does an HPCIGETVAR and then DISPLAYs the result. This would probably get around the I/O-redirection issue with < or >. Lars.

ATOM RSS1 RSS2