Solved

Quick access tools

  • 26 May 2021
  • 7 replies
  • 189 views

Userlevel 6
Badge +13

All,

Within Commvault console, we use the quick access tools feature a lot.
That’s very handy, and is an added value. (we also use similar things as workflows)
Despite it’s so usefull, it’s also causinng use headaches and spontaneous hair loss.

As long as you use a simple command, it works fine. but as soon as you use “|” , “$” in the oneliner, that becomes problematic. Especially when using powershell, where that is used a lot.
The documentation on quick access tools is very limited, hence my question over here:

What is the official way to use    ‘ , “ , | , & in the command / parameter of the quick access tool. What is the escape character?

 

 

 

icon

Best answer by Sravanthi Uppala 16 July 2021, 09:05

View original

7 replies

Userlevel 7
Badge +15

Hi @Bart 

Thanks for the question.

For the benefit of the Community, checking documentation on this: Executing the Workflow Tool from the CommCell Console

“Variable parameters are defined using the $ character which prompts the user to enter the required value during the execution of the application.”

Also 

“… you can use $%CLIENT_NAME%$. %CLIENT_NAME% is a tokenized parameter that automatically retrieves the hostname of the CommServe, MediaAgent or client computer.”

So $ and % are expected to delimit variables or parameters, but as you say, there is no mention of what escape character to use if you need to pass these characters as input to your script or application.

Usually, backslash is expected as escape character, but I will need to check internally to have this confirmed.

Thanks,

Stuart

Userlevel 6
Badge +13

@Stuart Painter I already tried backslash, but that diesn’t work. (was the first thing I tried)

Userlevel 7
Badge +23

Hey @Bart , following up to see if you got an answer here or not?  Might warrant opening a support case if this is not working as expected (and sharing the case number with @Stuart Painter and I :sunglasses: )

Userlevel 7
Badge +15

Hi @Bart 

I have some feedback from Dev on this one, my apologies with the delay, this got lost in my inbox, delay is on me.

Only $ and % are special characters, and we can use \ to escape $.

There is no way to escape %, and any text in between two %’s is considered a Commvault token.

I hope that helps.

Thanks,

Stuart

Userlevel 5
Badge +10

Hi @Bart 

I have some feedback from Dev on this one, my apologies with the delay, this got lost in my inbox, delay is on me.

Only $ and % are special characters, and we can use \ to escape $.

There is no way to escape %, and any text in between two %’s is considered a Commvault token.

I hope that helps.

Thanks,

Stuart

@Stuart Painter would it be possible to get around that by using the ASCII sequence \x25 instead?

Userlevel 7
Badge +15

Hi @Anthony.Hodges 

Thanks for the question, I’ve followed up your query with Dev.

I don’t have access to a lab or a test case for this, but I’ll see if we have an environment and throw together a script to see what the behaviour shows.

I’m guessing if we pass the acsii code for % (x25) it will either get interpreted as % or garbage. The aim here is to bamboozle the CV interpreter and get \x25 past it without realising it’s % and then have the next, powershell or cmd interpreter read it as genuine %. Sounds like having the cake and eating it.

Only testing will show what the behaviour is with \x25, but I’ll see Dev say as well.

Thanks,

Stuart

 

Badge

Hi @Bart 

% is also not a special character, and you can pass that safely to the underlying command. Anything in between two $'s is regarded as a parameter.You can use '\' to escape it.
And anything in between $% and %$ is considered as a token and it will be replaced with actual value while executing the tool. (Like $%CLIENT_NAME%$)

Please let me know if you need any more help regarding this.

Thanks,

Sravanthi.

Reply