Skip to main content

issue for commandout

Author: lalitpct@gmail.com (lalitpct)

code -->
activate "osunix".command(". $HOME/smt2 %%$$SERVER export MSG_LEVEL=UNI && chngpasswd.sh %%$$db_user %%$$ascii_password %%dum_verify %%$$server",script_output)
 

This works fine here  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager65 SMART2AP",script_output)

But it doesn work with special character is there in variable  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager" SMART2AP",script_output)

How this can be fixed ,any idea i mean for any special character it should take it  ?

issue for commandout

Author: lalitpct@gmail.com (lalitpct)

code -->
activate "osunix".command(". $HOME/smt2 %%$$SERVER export MSG_LEVEL=UNI && chngpasswd.sh %%$$db_user %%$$ascii_password %%dum_verify %%$$server",script_output)
 

This works fine here  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager65 SMART2AP",script_output)

But it doesn work with special character is there in variable  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager" SMART2AP",script_output)

How this can be fixed ,any idea i mean for any special character it should take it  ?

code -->
activate "osunix".command(". $HOME/smt2 %%$$SERVER export MSG_LEVEL=UNI && chngpasswd.sh %%$$db_user %%$$ascii_password %%dum_verify %%$$server",script_output)
 

my (not compiled or tested) code -->

variables

string vs_commandline

endvariables

vs_commandline = ". $HOME/smt2 %%$$SERVER export MSG_LEVEL=UNI && chngpasswd.sh %%$$db_user %%$$ascii_password %%dum_verify %%$$server"

; here you can add the $replace statements for escaping special characters

vs_commandline = $replace(vs_commandline, 1, "%%"", "\\%%"", -1)

activate "osunix".command(vs_commandline,script_output)
 


Author: ulrich-merkel (ulrichmerkel@web.de)

issue for commandout

Author: lalitpct@gmail.com (lalitpct)

code -->
activate "osunix".command(". $HOME/smt2 %%$$SERVER export MSG_LEVEL=UNI && chngpasswd.sh %%$$db_user %%$$ascii_password %%dum_verify %%$$server",script_output)
 

This works fine here  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager65 SMART2AP",script_output)

But it doesn work with special character is there in variable  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager" SMART2AP",script_output)

How this can be fixed ,any idea i mean for any special character it should take it  ?

after all, ou still have to present a proper commndline.

Something like:

"do my command" or so"

as in your example has unbalancd quotes what do you expect other tahn an error?


Author: ulrich-merkel (ulrichmerkel@web.de)

issue for commandout

Author: lalitpct@gmail.com (lalitpct)

code -->
activate "osunix".command(". $HOME/smt2 %%$$SERVER export MSG_LEVEL=UNI && chngpasswd.sh %%$$db_user %%$$ascii_password %%dum_verify %%$$server",script_output)
 

This works fine here  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager65 SMART2AP",script_output)

But it doesn work with special character is there in variable  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager" SMART2AP",script_output)

How this can be fixed ,any idea i mean for any special character it should take it  ?

yeah thats a varible and how to us it to take special character


Author: lalitpct (lalitpct@gmail.com)

issue for commandout

Author: lalitpct@gmail.com (lalitpct)

code -->
activate "osunix".command(". $HOME/smt2 %%$$SERVER export MSG_LEVEL=UNI && chngpasswd.sh %%$$db_user %%$$ascii_password %%dum_verify %%$$server",script_output)
 

This works fine here  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager65 SMART2AP",script_output)

But it doesn work with special character is there in variable  -->
activate "osunix".command(". $HOME/smt2 SMART2AP export MSG_LEVEL=UNI && chngpasswd.sh drg_ldos1 manager64 manager" SMART2AP",script_output)

How this can be fixed ,any idea i mean for any special character it should take it  ?

look in your Operating System manual how to "escape" these characters in command lines.

use $replace to change the string accordingly.


Author: ulrich-merkel (ulrichmerkel@web.de)