Im facing a problem with assigning a value to a variable that its name is stored in other variable or a file
cat ids.txt
ID1
ID2
ID3
What i want to do is:
for i in `cat ids.txt'; do $i=`cat /proc/sys/kernel/random/uuid`
or
for i in ID1 ID2 ID3; do $i=`cat /proc/sys/kernel/random/uuid`
But its not working. What i would like to have, its something like:
echo $ID1
5dcteeee-6abb-4agg-86bb-948593020451
echo $ID2
5dcteeee-6abb-4agg-46db-948593322990
echo $ID3
5dcteeee-6abb-4agg-86cb-948593abcd45