Here is sample code:
while IFS= read var
do
shopt -s expand_aliases
alias fin="cd /directory/"
fin
done
Result:
script.sh: line 53: fin: command not found
I am using var in other command. My concern here is that, after running script the error occurs.