sed -e "s/${MyToken}/${arg}/g" file
Value Of 'arg' working fine till 9th argument.after 10th arguments its failing
sed -e "s/${MyToken}/${arg}/g" file
Value Of 'arg' working fine till 9th argument.after 10th arguments its failing
Here is an example :
#!/bin/ksh
echo There is $# parameters
while [ $# -ne 0 ]; do
echo $1
shift
done
The output :
Will:/home> ./script a b c d e f g h i j k l m n o p q r s t u v w x y z
There is 26 parameters
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
$#count the number of parameters passed to your script.
Shift is moving the param to the left so after one loop $1 become b and so on.