I have this code
echo "er453*tyu" |awk -v s=* '{print index($1,s)}'
The code prints 6. Now I want to reference 6 as a variable. E.g.
$position= "er453*tyu" |awk -v s=* '{print index($1,s)}'
Then use the variable position somewhere else in my code.