Re: [j-nsp] Is it possible to pass apostrophe character(ASCII dec code 39) as an argument value to SLAX script?

2018-07-17 Thread Martin T
On Fri, Jul 13, 2018 at 12:35 AM Phil Shafer wrote: > > Martin T writes: > >aren't you using grave accent("echo -e "\x60"") character? I was using > >"echo -e "\x27"" character. > > Doh! I read apostrophe (even named the script apos.slax) but my > brain turned into backtick. > > Yes, this looks

Re: [j-nsp] Is it possible to pass apostrophe character(ASCII dec code 39) as an argument value to SLAX script?

2018-07-12 Thread Phil Shafer
Martin T writes: >aren't you using grave accent("echo -e "\x60"") character? I was using >"echo -e "\x27"" character. Doh! I read apostrophe (even named the script apos.slax) but my brain turned into backtick. Yes, this looks like a JUNOS bug: root@box> op apos char "'" ''':(null):(2) Invalid

Re: [j-nsp] Is it possible to pass apostrophe character(ASCII dec code 39) as an argument value to SLAX script?

2018-07-12 Thread Martin T
On Thu, Jul 12, 2018 at 11:20 PM Phil Shafer wrote: > > Martin T writes: > >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: > > Quote it: > > version 1.2; > > param $char = "-"; > >

Re: [j-nsp] Is it possible to pass apostrophe character(ASCII dec code 39) as an argument value to SLAX script?

2018-07-12 Thread Phil Shafer
Martin T writes: >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: Quote it: version 1.2; param $char = "-"; main { "got: " _ $char; } root@box> op apos char "`" got: `

Re: [j-nsp] Is it possible to pass apostrophe character(ASCII dec code 39) as an argument value to SLAX script?

2018-07-12 Thread Nathan Ward
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