I thought I had it by being cunning, but, no! {master} nward@mx> op test chr \x27 ''':(null):(2) Invalid expression error: runtime error error: Evaluating user parameter chr failed
{master} nward@mx> op test chr \\x27 '\'':(null):(3) Invalid expression error: runtime error error: Evaluating user parameter chr failed :-( > On 12/07/2018, at 8:00 PM, Martin T <m4rtn...@gmail.com> wrote: > > Hi! > > Is it possible to pass apostrophe character(ASCII dec code 39) as an > argument value to SLAX script? I have tried to escape it, but it does > not seem to work: > > root@vmx1> op test chr ' > ''':(null):(2) Invalid expression > error: runtime error > error: Evaluating user parameter chr failed > > root@vmx1> op test chr "'" > ''':(null):(2) Invalid expression > error: runtime error > error: Evaluating user parameter chr failed > > root@vmx1> op test chr \' > '\'':(null):(3) Invalid expression > error: runtime error > error: Evaluating user parameter chr failed > > root@vmx1> op test chr ''' > ''''':(null):(2) Invalid expression > error: runtime error > error: Evaluating user parameter chr failed > > root@vmx1> > > > Script named test is following: > > root@vmx1> file show /var/db/scripts/op/test.slax > version 1.1; > > ns junos = "http://xml.juniper.net/junos/*/junos"; > ns xnm = "http://xml.juniper.net/xnm/1.1/xnm"; > ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0"; > > import "../import/junos.xsl"; > > var $arguments = { > <argument> { > <name> "chr"; > } > } > > param $chr; > > match / { > <op-script-results> { > <output> "Character: " _ "'" _ $chr _ "'"; > } > } > > root@vmx1> > > I guess it is not possible and one needs to use get-input() function? > > > thanks, > Martin > _______________________________________________ > juniper-nsp mailing list juniper-nsp@puck.nether.net > https://puck.nether.net/mailman/listinfo/juniper-nsp _______________________________________________ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp