Hi all,
sorry if I'm asking something that is not directly related to Rocket Software, but I figured this forum could be my best chance to get an answer, as Google let me down this time 🙁
I am trying to check for the existence of a directory and create it if it doesn't exist. I'd like to do it in just one command, so I coded this:
cmd = "test | -e '"||ussLibSvil||"/"||_path||"' && mkdir -p "||ussLibSvil||"/"||_path
ussrc = bpxwunix(cmd,,stdout.,stderr.,,0)
The command contained in the cmd variable works correctly if I enter it directly at the shell pormpt.
However, when run from Rexx code I get this error (the output is mangled by my error trap routine):
Command: test ! -e '/u/sigdc/sigdc.hna.gitdev/source' && mkdir -p /u/sigdc/sigdc.hna.gitdev/source
Error: cannot continue (RC = 127)
Error Detail:
CMD: FSUM7351 not found
***
I think that the problem lies in the concatenation of commands with "&&", but I can't find a way to fix it. Maybe I need to escape those ampersands somehow?
I tried with four ampersands, tried substituting "&" with "\\&" but nothing works. Or am I completely off-track?
Is there anybody that can help me?
Thank you in advance
Cris
------------------------------
Cristiano Guadagnino
Creval
------------------------------