Input file :
5 20
500 2
20 41
41 0
23 1
Desired output :
5
2
20
0
1
By comparing column 1 and 2 in each line, I hope can print out the column with smallest number.
I did try the following code, but it don't look good
awk '$1<$2{print $1}' input_file
5
20
awk '$2<$1{print $2}' input_file
2
0
1
Thanks for any advice.