op 03-06-14 15:18, schreef Tim Dunphy:
[root@uszmpwslp014lc ~]# GET http://$(hostname -i)/server-status | grep
-i requests/sec
<dt>4.08 requests/sec - 80.9 kB/second - 19.8 kB/request</dt>
That works ok. And next I'm grepping it back down and awking it to just the
part I'm interested in:
[root@uszmpwslp014lc ~]# GET http://$(hostname -i)/server-status | grep -i
-e request -e requests/sec | grep -i -v -e currently -e code -e ss | awk
'{print $1}'
<dt>4.08
But now I need to get rid of just the <dt> in front of the 4.08?
cut --delimiter=">" --field=2
you could even get rid of the awk and pipe your grep to cut --delimiter=">" --field=2 |
cut --delimiter=" " --field=1
But there are many different ways to solve this.
greetings
Patrick
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos