Hi I am trying to insert a variable in 2nd line of a file. But it never takes variable value rather keeps taking it as text.
root@vm-test-001:~/mongosearch# part=( "${arr[@]:i:batchsize}" ) root@vm-test-001:~/mongosearch# echo $part "C:00000092666270:53882159774" root@vm-test-001:~/mongosearch# perl -ni -e 'print; print "permissib +leCars = [ \${part[*]} ]\n" if $. == 2' query/containerId_count.js
This keeps inserting $part as text like permissibleCars = [ ${part*} ] and not as variable like permissibleCars = "C:00000092666270:53882159774" How can this get fixed ?
In reply to Inserting Variable Through Perl by Abhay_Anand
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |