Hi All,
Although its a basic question the last 2 hours of googling and trying didnt help me to achieve what i want. Maybe some one can help me
I have a text file
text1.txt:
blablablabla
A B C
D E F
and i would like to read to read what is on position E (line 3 column 2) in a variable.
i found a way to print it:
awk 'NR==3{print $2}'text1.txt
but i didnt manage to load it in a variable
i tried:
#!/user/bin/csh
set x=`awk 'NR==3{print $2}'text1.txt`
#and
set x=$(awk 'NR==3{print $2}'text1.txt)
echo "$x"
but it didnt work =(
Since the rest of my code is already in csh i hope some one can help me to read in this values in variables.
Thank you very much.
Radamez