I am having the following structure(only one row)
col1 col2 col3 col4
----------------------
12 34 14 10
what I have to do is I have to fetch col2 and col4 and used that value in shell.
a=$(awk 'NR<2{$2}')
b=$(awk'NR<2{$4}')
and I have to use a and b in my shell scripting.
but this is not a good idea as I am using awk two times instead I am fetching value like this .
awk'NR<2{ a=$2;b=$4}'
but I dont know how can I use this a and b in my shell.