find with given number and express output

file A
eebbbeeeeee
file B
4

Question is by file B and look into file A
output is b

awk  -v v1=4  file B or something else

awk -v v1=`cat file_b` '{print substr($1,v1,1)}' file_a
1 Like
cut -c "$(cat fileB)" fileA
1 Like