bash - Loop through output of command searching for number over 50 -
i trying loop through output of command, example
john 45 ted 35 eric 65 bob 25 jeff 50
it loop through 1 line @ time, print message line on 60, eric printed out
/dev/mapper/vg_bob-lv_root 31 /dev/sda1 12 /dev/sdb1 2
no looping needed awk
simpler this:
awk '$2>60{print $1}' file eric
Comments
Post a Comment