Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iseq on a string with a space??
2016-02-11, 22:01
Post: #3
RE: iseq on a string with a space??
(2016-02-11 21:28)NiKiZe Wrote:  
(2016-02-11 21:15)robzr Wrote:  On a Dell server, the ${manufacturer} variable is "Dell Inc.". I cannot figure out a way to do an iseq on this variable, I tried:

iseq ${manufacturer} Dell${}Inc.

But it always evaluates false. Using anything with a space, 'Dell Inc.', "Dell Inc.", Dell\ Inc., etc, always results in syntax error since it is parsed as two arguments.

Any recommendations?

To create a variable that contains a space run
Code:
set sp:hex 20 && set sp ${sp:string}

Now you can run
Code:
iseq ${manufacturer} Dell${sp}Inc.

If it does not work, what is the output of echo ${manufacturer:hexhyp} ?

That worked - thanks! I'm surprised the parser doesn't support at least a backslash escape at the least, must be a very lightweight routine.

Rob
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: iseq on a string with a space?? - robzr - 2016-02-11 22:01



User(s) browsing this thread: 1 Guest(s)