[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 10:45:03 -0300 |
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