for i in {0..10}
do
args='{"args": [ "createProperty", "Property$i", "StreetNumer$i", "StreetName$i", "City$i", "State$i", "County$i", "ZipCode$i", "TaxID$i", "PropertyType$i", "CreationDate$i", "CreatingOrganization$i" ,"publicKey$i"]}'
echo $args
done
Asked
Active
Viewed 18 times
0

Cyrus
- 84,225
- 14
- 89
- 153

Sandeep Gupta
- 51
- 3
-
I am not able to interpolate i variable in args. it is showing $i as it is – Sandeep Gupta Dec 26 '17 at 11:51
-
1Parameter expansion is not performed within single quotes. – gniourf_gniourf Dec 26 '17 at 11:54
-
thanks. could you please let me know the correct code for getting the expected output – Sandeep Gupta Dec 26 '17 at 12:04
-
I suggest to replace all `"` with `\"` and all `'` with `"` and `$args` with `"$args"`. – Cyrus Dec 26 '17 at 12:06
-
Thanks everyone. This trick worked. – Sandeep Gupta Dec 26 '17 at 17:33