Method to embed semicolon in a string
Moderators: Lavish Software Team, Moderators
-
- GamingTools Subscriber
- Posts: 29
- Joined: Wed Jun 30, 2010 7:48 am
Method to embed semicolon in a string
I wish to create a command on the fly along the lines of:
variable string Command
Command:Set[execute <command1> ; <command2>]
relay all ${Command.Escape}
but I can find no way to embed the semicolon into Command. For example, if I do the following:
Command:Set[\;]
echo ${Command.Escape}
returns
echo: <text>
It appears there is no way to escape semicolon.
So is what I am trying to do even possible (i.e, relay 2 or more commands to be execute at once). If so, how do I arrange it syntactically?
Thanks
variable string Command
Command:Set[execute <command1> ; <command2>]
relay all ${Command.Escape}
but I can find no way to embed the semicolon into Command. For example, if I do the following:
Command:Set[\;]
echo ${Command.Escape}
returns
echo: <text>
It appears there is no way to escape semicolon.
So is what I am trying to do even possible (i.e, relay 2 or more commands to be execute at once). If so, how do I arrange it syntactically?
Thanks
-
- GamingTools Subscriber
- Posts: 29
- Joined: Wed Jun 30, 2010 7:48 am
For some reason, this does not work for me. So if I try the following:
variable string Command
Command:Set[";"]
echo ${Command.Escape}
I get:
Syntax: Echo <text>
When I try embedding a ; into a longer string, anything after the ; is ignored, i.e., it appears to be treating everything after the ; as a comment.
variable string Command
Command:Set[";"]
echo ${Command.Escape}
I get:
Syntax: Echo <text>
When I try embedding a ; into a longer string, anything after the ; is ignored, i.e., it appears to be treating everything after the ; as a comment.
Because once again you need to quote to remove the behavior of the ;
Code: Select all
echo "${Command.Escape}"
-
- GamingTools Subscriber
- Posts: 29
- Joined: Wed Jun 30, 2010 7:48 am
-
- GamingTools Subscriber
- Posts: 29
- Joined: Wed Jun 30, 2010 7:48 am
Well, as it turns out, I still have an issue. I am unable to get two commands to execute using the execute command. So, for example
execute "echo one ; echo two"
only outputs "one".
Ultimately, what I want is to be able to execute multiple commands using relay, like:
relay all execute "echo one ; echo two"
Is there a way to do this?
execute "echo one ; echo two"
only outputs "one".
Ultimately, what I want is to be able to execute multiple commands using relay, like:
relay all execute "echo one ; echo two"
Is there a way to do this?
The space after your semicolon is breaking the command parser.
works fine
Code: Select all
execute "echo one;echo two"
-
- GamingTools Subscriber
- Posts: 29
- Joined: Wed Jun 30, 2010 7:48 am