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

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

Re: [shell-script] colunas


From: Adolfo Verçosa
Subject: Re: [shell-script] colunas
Date: Thu, 12 Dec 2013 16:17:15 -0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Coloque

ls | cat -n |paste -s

Adolfo Verçosa
Fortaleza-CE



Em 12/12/2013 16:13, 빠는 Leonardo Goretti escreveu:
 
Fala Thiago.
Pois é... a saída ficou assim...
21-helochecks
22-ip-access
23-liberados
24-LICENSE
25-main.cf
26-main.cf_20130727

Em uma única coluna, e minha necessidade é de saídas lado a lado

21-helochecks  22-ip-access 23-liberados 24-LICENSE 25-main.cf  26-main.cf_20130727


Grato




Em 12 de dezembro de 2013 16:06, Tiago Peczenyj <address@hidden> escreveu:
 
NR no lugar de ++i no awk tambem funciona.


2013/12/12 Tiago Peczenyj <address@hidden>
talvez isso ajude

ls | cat -n | awk '{printf "%02d-%s\n",$1,$2}'

ls | awk '{printf "%02d-%s\n",++i,$1}'





2013/12/12 빠는 Leonardo Goretti <address@hidden>
 
Boa tarde.
Em parte do script preciso que a saida do comando ls saia numerada,

ex comun
#ls
arquivo_A    arquivo_B  arquivo_C

Minha necessidade

# ls

01-arquivo_A   02-arquivo_B ,........

ja tentei com column,.. pr ..... awk,    mas não achei...
Alguma idéia.


grato


--

Leonardo Goretti
Analista de infraestrutura - GNU/LINUX mais2x.com
Instrutor GNU/LINUX
Celular: +55 (61)
9249 6161
Gtalk: address@hidden
----------------------------------------------
Linux Certification (LPIC-1)
Novell Certified Linux Administrator (CLA)
Novell Data Center Technical Specialist




--
Tiago B. Peczenyj
Linux User #405772

http://about.me/peczenyj



--
Tiago B. Peczenyj
Linux User #405772

http://about.me/peczenyj



--

Leonardo Goretti
Analista de infraestrutura - GNU/LINUX mais2x.com
Instrutor GNU/LINUX
Celular: +55 (61)
9249 6161
Gtalk: address@hidden
----------------------------------------------
Linux Certification (LPIC-1)
Novell Certified Linux Administrator (CLA)
Novell Data Center Technical Specialist



reply via email to

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