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: Raul Libório
Subject: Re: [shell-script] Re: Comando GREP Coluna X Linha
Date: Thu, 9 Jun 2016 17:10:13 -0300


On Thu, Jun 9, 2016 at 5:08 PM, address@hidden [shell-script] <address@hidden> wrote:
[root@localhost tmp]# df -h | awk '$5 ~ /^[5-9][0-9]%$/ { print "Status", $1, $5 }'

O meu não ficou tão purista quanto o do Itamar, mas funcionou :D

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6        24G   12G   11G  53% /
tmpfs           1,9G     0  1,9G   0% /dev/shm
/dev/sda1       194M  125M   60M  68% /boot
/dev/sda3       985M   18M  918M   2% /tmp
/dev/sda2       4,9G  313M  4,3G   7% /var/log

# df -h | tr -d '%' | awk '$5 > 50''{if (NR!=1) print $1"\tuso: "$5"%"}'
/dev/sda6       uso: 53%
/dev/sda1       uso: 68%


Raul Libório
http://rauhmaru.blogspot.com/
openSUSE Member | Linux User #4444581

/etc/httpd/conf.d/ssl.conf:7
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.

reply via email to

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