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

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

Re: [shell-script] colunas


From: Tiago Peczenyj
Subject: Re: [shell-script] colunas
Date: Thu, 12 Dec 2013 16:05:58 -0200

talvez isso ajude

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

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

https://gist.github.com/anonymous/cc4528646a4ddb122532




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

reply via email to

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