shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Re: Comando GREP Coluna X Linha


From: Janduy Euclides
Subject: Re: [shell-script] Re: Comando GREP Coluna X Linha
Date: Fri, 10 Jun 2016 11:47:48 -0300

Itamar eu acho que deu ruim em outro linux por que ele tem um volume LVM. 

Filesystem            Size  Used Avail Use% Mounted on

/dev/mapper/VolGroup00-LogVol00

                       84G   47G   33G  59% /

/dev/sda1              99M   18M   76M  20% /boot

tmpfs                1008M     0 1008M   0% /dev/shm


RESULTADO:

[root@vm tmp]# df  -h | awk '$4 >= 50 && NR>1 { print "Status", $1, $4 }' 

Status 84G 59% 

Status /dev/sda1 76M


Acredito que por a linha(1) esta com um label grande ele esta descendo trazendo os dois valores kkkkk  ;-( 





Atenciosamente,




Em 9 de junho de 2016 20:06, address@hidden [shell-script] <address@hidden> escreveu:
 

Tenta isso tb para experimentar

[root@localhost tmp]# 
df  -h | awk '$5 >= 50 && NR>1 { print "Status", $1, $5 }'

pode-se fazer a condição diretamente no awk

[]'s
Itamar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]