Skip to main content
Solved

Problem: User definable variables in Casper Remote

  • June 13, 2014
  • 2 replies
  • 18 views

Forum|alt.badge.img+19

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.

2 replies

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • 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
  • June 13, 2014

Ah... genius!

Yes, that works just as it should.

Thank you

Peter