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

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

Re: [shell-script] Formatar valores sequenciais em colunas


From: miranda
Subject: Re: [shell-script] Formatar valores sequenciais em colunas
Date: Wed, 24 Jun 2009 11:05:07 -0300

Aliás só vai funcionar com COLS={1..9}

On Wed, 2009-06-24 at 10:45 -0300, miranda wrote:
> Aproveitando a dica ... veja :
> [root@guitar cgi-bin]# cat entrada
> a
> b
> c
> d
> e
> f
> g
> h
> i
> j
> k
> l
> [root@guitar cgi-bin]# export COLS=3
> [root@guitar cgi-bin]# paste $(seq -s' ' $COLS|tr [[:digit:]]
> '-')<entrada
> a     b       c
> d     e       f
> g     h       i
> j     k       l
> [root@guitar cgi-bin]# COLS=6
> [root@guitar cgi-bin]# paste $(seq -s' ' $COLS|tr [[:digit:]]
> '-')<entrada
> a     b       c       d       e       f
> g     h       i       j       k       l
> 
> 
> On Wed, 2009-06-24 at 09:15 -0300, Cléoson Barreto wrote:
> > a
> > b
> > c
> > d
> > e
> > f
> > g
> > h
> > i
> 
> 
> 
> ------------------------------------
> 
> ---------------------------------------------------------------------
> Esta lista não admite a abordagem de outras liguagens de programação, como 
> perl, C etc. Quem insistir em não seguir esta regra será moderado sem prévio 
> aviso.
> ---------------------------------------------------------------------
> Sair da lista: address@hidden
> ---------------------------------------------------------------------
> Esta lista é moderada de acordo com o previsto em 
> http://www.listas-discussao.cjb.net
> ---------------------------------------------------------------------
> Servidor Newsgroup da lista: news.gmane.org
> Grupo: gmane.org.user-groups.programming.shell.brazil
> 
> Links do Yahoo! Grupos
> 
> 



reply via email to

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