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

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

Re: [shell-script] Usando AWK


From: Gentil de Bortoli Júnior
Subject: Re: [shell-script] Usando AWK
Date: Tue, 31 Jan 2006 10:32:43 -0200

Correção:

#!/usr/bin/awk -f
BEGIN {
    len = 20
    string = "12312312312312312312312312312312"
}

{
    if ((length($0) < len) || (substr($0, 0, 33) != string)) {
        printf "Linha %s é inválida\n", $0
    }
}

Depois li seu e-mail melhor. Creio que você queira || (ou) e não && (e), como
estava no e-mail anterior.

--
Gentil de Bortoli Júnior
Chave GPG: http://gentil.bortoli.com.br/gpg

"There Is No Gene For The Human Spirit"


reply via email to

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