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

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

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


From: Raul Libório
Subject: Re: [shell-script] Comando GREP Coluna X Linha
Date: Fri, 10 Jun 2016 12:06:34 -0300


2016-06-10 4:50 GMT-03:00 Tiago Peczenyj address@hidden [shell-script] <address@hidden>:
awk não tem tipos de variaveis no sentido de serem numeros ou strings. mas existem umas regras de contexto, por exemplo em uma operação numerica eu vou tentar converter a string para numero. nesse caso fazendo $5 + 0 eu estou forçando que "58%" vire 58 pois segundo as regras, se a string começar com um numero, o que não for pertinente sera ignorado. 

Tiago, realmente eu não sabia disso, tanto que utilizei o tr -d '%' justamente para remover o % e realizar a comparação.
Obrigado pelo esclarecimento.

Abraços

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]