justit1976
(usa Outra)
Enviado em 03/08/2012 - 13:17h
Usei da seguinte forma, mas nao ta ordenando os valores:
grep "CPU utilization" /home/backup-equipamentos/show-cma/`date +%Y%m%d`/* | awk '{print substr($1,0,length($1)-3)" "$10" "$11 $12}'
Veja o output:
/home/backup-equipamentos/show-cma/20120803/sw54.spo.show-sw-cisco five minutes:7%
/home/backup-equipamentos/show-cma/20120803/sw55.spo.show-sw-cisco five minutes:6%
/home/backup-equipamentos/show-cma/20120803/sw61.spo.show-sw-cisco five minutes:5%
/home/backup-equipamentos/show-cma/20120803/sw62.spo.show-sw-cisco five minutes:11%
/home/backup-equipamentos/show-cma/20120803/sw63.spo.show-sw-cisco five minutes:4%
Queria que ficasse assim:
/home/backup-equipamentos/show-cma/20120803/sw63.spo.show-sw-cisco five minutes:4%
/home/backup-equipamentos/show-cma/20120803/sw61.spo.show-sw-cisco five minutes:5%
/home/backup-equipamentos/show-cma/20120803/sw55.spo.show-sw-cisco five minutes:6%
/home/backup-equipamentos/show-cma/20120803/sw54.spo.show-sw-cisco five minutes:7%
/home/backup-equipamentos/show-cma/20120803/sw62.spo.show-sw-cisco five minutes:11%