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: Thu, 9 Jun 2016 17:36:31 -0300

Sim Raul.  Galera muito obrigado pela ajuda, com esses modelos eu ja consegui fazer o que eu precisava. 

Agradeço a todos a força. ✌




Atenciosamente,




2016-06-09 17:28 GMT-03:00 Raul Libório address@hidden [shell-script] <address@hidden>:
 

A diferença entre os nossos é que o Itamar utilizou filtros, com regex, e o meu foi com base em cálculo aritmético.


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.

On Thu, Jun 9, 2016 at 5:24 PM, Janduy Euclides address@hidden [shell-script] <address@hidden> wrote:
 

Nem o meu Raul kkk, o Itamar fez um bem pratico mesmo, vou trabalhar em cima desses exemplos. 


Atenciosamente,




2016-06-09 17:10 GMT-03:00 Raul Libório address@hidden [shell-script] <address@hidden>:
 


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]