I'm trying to get awk to do arithmetic functions with external variables and I'm getting an error that I cannot figure out how to fix.
Insight would be appreciated
money=$1
rate1=$(awk -F"\t " '/'$converting'/{print $3}' convert.table)
rate2=$(awk -F"\t" '/'$converted'/{print $3}' convert.table)
awk -F"\t" '{printf '$rate2'/'$rate1'*'$money'}'
OUTPUT
awk: cmd. line:1: {printf 3.3513
awk: cmd. line:1: ^ unexpected newline or end of string