[Cascavel-pm] formatar aquivo

Fernando Oliveira fernandocorrea em gmail.com
Terça Agosto 26 14:22:51 PDT 2008


Muito boa!

2008/8/26 Wendel Scardua <wendelscardua em gmail.com>

> Esse aí não funcionou direito; aqui imprimiu
> 1
> 2-3
> 4-5
> etc...
>
> A propósito, minha tacada é essa:
>
> perl -pe'--$|&&s|\n|-|'
>
> (finalmente pude usar o "magical flip-flop" $|-- que eu aprendi outro dia
> :-) )
>
> []s
> Wendel
>
> 2008/8/26 Fernando Oliveira <fernandocorrea em gmail.com>:
> > ou:
> >
> > perl -pe'$i++%2&&s|\n|-|'
> >
> > 2008/8/26 Fernando Oliveira <fernandocorrea em gmail.com>
> >>
> >> Desculpem, esquecí alguns espaços...
> >>
> >> perl -pe's|\n|-| if++$i%2'
> >>
> >> 2008/8/26 Fernando Oliveira <fernandocorrea em gmail.com>
> >>>
> >>> Minha tacada então:
> >>>
> >>> perl -pe's|\n|-| if ++$i % 2'
> >>>
> >>> 2008/8/26 Wallace Reis <reis.wallace em gmail.com>
> >>>>
> >>>> On Tue, Aug 26, 2008 at 4:55 PM, Nilson Santos Figueiredo Junior
> >>>> <acid06 em gmail.com> wrote:
> >>>> > 2008/8/26 Nilson Santos Figueiredo Junior <acid06 em gmail.com>:
> >>>> >> Não costumo fazer isso mas vai lá:
> >>>> >>
> >>>> >>  perl -ne 'chomp; print $_, $i++ % 2 ? "\n" : "-"'
> >>>> >
> >>>> > Ou ainda:
> >>>> >
> >>>> >  perl -ne 's|\n|-| if !($i++ % 2); print'
> >>>>
> >>>> Será o iniício de um golf game?
> >>>>
> >>>> --
> >>>> wallace reis/wreis
> >>>> _______________________________________________
> >>>> Cascavel-pm mailing list
> >>>> Cascavel-pm em pm.org
> >>>> http://mail.pm.org/mailman/listinfo/cascavel-pm
> >>>
> >>>
> >>>
> >>> --
> >>> Just another Perl Hacker,
> >>> Fernando (SmokeMachine)
> >>> http://perl-e.org
> >>
> >>
> >>
> >> --
> >> Just another Perl Hacker,
> >> Fernando (SmokeMachine)
> >> http://perl-e.org
> >
> >
> >
> > --
> > Just another Perl Hacker,
> > Fernando (SmokeMachine)
> > http://perl-e.org
> >
> > _______________________________________________
> > Cascavel-pm mailing list
> > Cascavel-pm em pm.org
> > http://mail.pm.org/mailman/listinfo/cascavel-pm
> >
>
>
>
> --
> []s
> Wendel
> _______________________________________________
> Cascavel-pm mailing list
> Cascavel-pm em pm.org
> http://mail.pm.org/mailman/listinfo/cascavel-pm
>



-- 
Just another Perl Hacker,
Fernando (SmokeMachine)
http://perl-e.org
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/cascavel-pm/attachments/20080826/d27b92b7/attachment.html>


Mais detalhes sobre a lista de discussão Cascavel-pm