Skip to main content
Solved

Problem: User definable variables in Casper Remote


Forum|alt.badge.img+19
  • Valued Contributor
  • 62 replies

I have a script that i'm putting into Casper for techs to modify a plist on a users computer.
It is using up to $10.

Whenever I run the script field 10 (and 11) return odd results.

example:

#! /bin/sh

echo $1
echo $2
echo $3
echo $4
echo $5
echo $6
echo $7
echo $8
echo $9
echo $10
echo $11

In Remote, add data to fields. in this example the number of the variable.
external image link

when it is run, i get a "/0" and a "/1" no matter what I enter for data.

external image link

... anyone have this problem, or am just doing something stoopid?

Peter

Best answer by mm2270

I once had this issue awhile back and some wise folks directed me to enclosing the variables in curly braces, like so-
echo ${10}
echo ${11}

Try that. It should resolve your issue.

View original
Did this topic help you find an answer to your question?

2 replies

mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • Answer
  • June 13, 2014

I once had this issue awhile back and some wise folks directed me to enclosing the variables in curly braces, like so-
echo ${10}
echo ${11}

Try that. It should resolve your issue.


Forum|alt.badge.img+19
  • Author
  • Valued Contributor
  • 62 replies
  • June 13, 2014

Ah... genius!

Yes, that works just as it should.

Thank you

Peter


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings