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

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

Re: [shell-script] Usando awk + sub


From: Gustavo Soares [SLot]
Subject: Re: [shell-script] Usando awk + sub
Date: Mon, 01 Apr 2013 16:14:36 -0300
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

Acabei usando da forma que você me passou, mas ele imprime TODO o documento, como eu delimitei no início para fazer somente a primeira linha, não gostaria de ter que usar o head para isso.

Alguma idéia ?


root@testejava:/root>awk 'NR=1 {if ( $1 == "JasperPrint" ) $1 }; {gsub(/-/," ",$1)}; {gsub(/\./," ",$1); print}' /tmp/jasper2.txt | head -n1
LBANCO 703 687
root@testejava:/root>




Em 01-04-2013 16:06, Leslie Watter escreveu:
awk 'gsub(/-/," ",$0)


--
-------------------
SLot
Linux User: 124842
XMPP: address@hidden



reply via email to

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