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
> 

Responder a