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

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

RE: [shell-script] retirar campos no final da linha


From: Marcio Gil
Subject: RE: [shell-script] retirar campos no final da linha
Date: Wed, 13 Jan 2010 14:14:58 -0200

Se o objetivo for retirar os últimos campos em branco:

$ teste='teste;aaaa;cccc;dddd;;;;;;'

$ echo $teste
teste;aaaa;cccc;dddd;;;;;;

$ echo $teste | sed 's/;;\+$//'
teste;aaaa;cccc;dddd

> -----Original Message-----
> From: araujo_70
> 
> Senhores 
> 
> Como eu consigo retirar as os ultimos campos de uma linha .. 
> 
> eis a linha:
> 
>  
> teste;aaaa;cccc;dddd;;;;;;
> 
> 
> Tem q ficar assim:
> 
> teste;aaaa;cccc;dddd
> 
> 
> Atc 
> 
> João Lopes
> 



reply via email to

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