Hello,
could someone please explain why in examples below awk with $5>"57" returns red line too? With $5<"57" doesn't.
Code:
$ df -v -g >/tmp/output
$ cat /tmp/output
Filesystem GB blocks Used Free %Used Iused Ifree %Iused Mounted on
/dev/hd4 0.50 0.19 0.31 39% 10132 73117 13% /
/dev/hd2 2.25 2.09 0.16 93% 45467 42195 52% /usr
/dev/hd9var 0.44 0.35 0.09 80% 8219 22854 27% /var
/dev/hd3 0.12 0.00 0.12 2% 41 31969 1% /tmp
/dev/hd1 0.06 0.00 0.06 1% 5 14543 1% /home
/dev/hd11admin 0.12 0.00 0.12 1% 5 29133 1% /admin
/proc - - - - - - - /proc
/dev/hd10opt 0.44 0.25 0.19 57% 8956 45165 17% /opt
/dev/livedump 0.25 0.00 0.25 1% 4 58200 1% /var/adm/ras/livedump
$ awk 'NR==1 || $5>"51"' /tmp/output
Filesystem GB blocks Used Free %Used Iused Ifree %Iused Mounted on
/dev/hd2 2.25 2.09 0.16 93% 45467 42195 52% /usr
/dev/hd9var 0.44 0.35 0.09 80% 8219 22854 27% /var
/dev/hd10opt 0.44 0.25 0.19 57% 8956 45165 17% /opt
$ [bold]awk 'NR==1 || $5>"57"' /tmp/output[/bold]
Filesystem GB blocks Used Free %Used Iused Ifree %Iused Mounted on
/dev/hd2 2.25 2.09 0.16 93% 45467 42195 52% /usr
/dev/hd9var 0.44 0.35 0.09 80% 8219 22854 27% /var
[red]/dev/hd10opt 0.44 0.25 0.19 57% 8956 45165 17% /opt[/red]
$ [bold]awk 'NR==1 || $5<"57"' /tmp/output[/bold]
Filesystem GB blocks Used Free %Used Iused Ifree %Iused Mounted on
/dev/hd4 0.50 0.19 0.31 39% 10132 73117 13% /
/dev/hd3 0.12 0.00 0.12 2% 41 31969 1% /tmp
/dev/hd1 0.06 0.00 0.06 1% 5 14543 1% /home
/dev/hd11admin 0.12 0.00 0.12 1% 5 29133 1% /admin
/proc - - - - - - - /proc
/dev/livedump 0.25 0.00 0.25 1% 4 58200 1% /var/adm/ras/livedump
$ ( awk 'NR==1 || $5>"57"' /tmp/output ; awk '$5<"57"' /tmp/output )|sort|cksum
905655793 825
$ sort /tmp/output|cksum
905655793 825
$ awk 'NR==1 || $5=="57"' /tmp/output
Filesystem GB blocks Used Free %Used Iused Ifree %Iused Mounted on
$ awk 'NR==1 || $5~/^57/' /tmp/output
Filesystem GB blocks Used Free %Used Iused Ifree %Iused Mounted on
/dev/hd10opt 0.44 0.25 0.19 57% 8956 45165 17% /opt
$