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

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

Re: [shell-script] Numerar linha saia de comando


From: Anderson Duarte
Subject: Re: [shell-script] Numerar linha saia de comando
Date: Sun, 03 May 2009 14:46:43 -0300
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 

Com o cat tb funcionaria como vc estava fazendo, era só adicionar mais
um pipe e o 'nl' para poder numerar as linhas.

rizada@m0rph3us:~$ cat /boot/grub/menu.lst | grep title | nl
     1  title           Debian GNU/Linux, kernel 2.6.26-2-686
     2  title           Debian GNU/Linux, kernel 2.6.26-2-686
(single-user mode)
     3  title           Debian GNU/Linux, kernel 2.6.26-1-686
     4  title           Debian GNU/Linux, kernel 2.6.26-1-686
(single-user mode)
     5  title           Debian GNU/Linux, kernel 2.6.24-1-686
     6  title           Debian GNU/Linux, kernel 2.6.24-1-686
(single-user mode)

Mas é claro que a solução do Raul ficou muito mais elegante! ;-)


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iEYEARECAAYFAkn92IIACgkQ7+1Sg6xFb+onwwCcCblR1J4KK1xCsGEpCakvbJ3q
rx0AoN5bj8bjN6grOmq0A28vZMizvpHo
=4as4
-----END PGP SIGNATURE-----



reply via email to

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