-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dan Angelescu wrote:
> Va salut!
>
> Stiti cum as putea selecta a doua linie din outputul
> lui df ( mai precis spatiul liber) din df /dev/adxxx ?
>
> Multumesc anticipat.
Pentru scripturi shell cu o combinate de head si tail.
In general selectarea an <M> linii incepand cu linia <N> se poate face cu:
<comanda> | head -<N> | tail -<M>
particularizand (comanda = df /dev/adxx, M = 1, N = 2):
df /dev/adxxx | head -2 | tail -1
in cazu asta output-ul avind doar doua linii, head-ul nu mai este
necesar si varianta mai simpla este:
df /dev/adxxx | tail -1
Ex.
eris# df | head -2 | tail -1
/dev/ad0s1a 1012974 100364 831574 11% /
eris# df /dev/ad0s1a | tail -1
/dev/ad0s1a 1012974 100364 831574 11% /
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCymO+D5KGII5kgekRAjnJAKDTZJtCiVkuKJCS3GRLEYksgVABJACgpQtC
f7839ekZ2kplz6mf/S8J37c=
=9l4v
-----END PGP SIGNATURE-----
__________________________________________________________
Send 'unsubscribe rofug' to [EMAIL PROTECTED] to unsubscribe