Unix is supposed to not process any special characters inside single quotes
so drop the change commands and use  SQUOTE .

-- mats



Marco Manyevere skrev:
Im trying to process the contents of a string generated in Universe with an
external program by shelling out to the OS as follows:

CHANGE '\' TO '\\' IN
STR1
CHANGE '"' TO '\"' IN STR1
SH.CMD = 'SH -c echo ':QUOTE(STR1):' |
./myscript'
EXECUTE SH.CMD CAPTURING RESULT

STR1 can contain any characters
so to avoid interpratation by the shell I put the two CHANGE statements but it
seems some situations are still not covered, for example when STR1 contains
\008, the output is wrong. Does anyone know how I can make this foolproof or
an alternate method? I am able to get consistent results by writing STR1 to a
temp file then running my script with input and output redirection but I want
to cut down on unnecessary disk IO.

Another question: While STR1 is
guaranteed not to exceed 4k, does anyone know the maximum size of the command
I can run in this way? Im on AIX.

Marco.
__________________________________________________________
Sent from Yahoo!
Mail - a smarter inbox http://uk.mail.yahoo.com
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to