I'm having troubles with a for loop, similar to below:
for VARIABLE in alpha bravo charlie; do $VARIABLE=`sed -n '/$VARIABLE/s///gp;' $FILE` done
$FILE might contain something like
alpha sandy bravo cathy charlie barbara
Expected results should be...
echo $alpha # sandy echo $bravo # cathy echo $charlie # barbara
Unfortunately I get errors:
bash: alpha=alpha: command not found bash: bravo=alpha: command not found bash: charlie=alpha: command not found