How to read the value from a specific line and column BASH

Hi All,
I have the same problem as the one posted in

but I'm using bash.
Can anyone tell me how I have to modify the code to make it bash compatible?

eval `awk 'NR==3{print "set x="$2}' text1.txt 

Thank you,
Sarah

Hi.

Just remove the word set.

or

x=$(nawk 'NR==3{print $2}' infile)

:cool::wink:

Thank you,
I have a problem feeding awk the line number as variable:
e.g.

awk '(NR==$ST_LINE){print $2}' file

won't work
while

awk '(NR==10142){print $2}' file

does

I tried also {} but it gives an error

awk 'NR==st{print $2}' st="${ST_LINE}" file
awk '(NR=='$ST_LINE'){print $2}' file