[LugBS] grep regex
necro
necro a circolab.net
Ven 9 Ott 2009 20:51:56 UTC
2009/10/9 necro <necro a circolab.net>:
> du -h | grep -E "[0-9]+M"
-_-
ovviamente avrebbe dovuto essere :
du -h | grep -E "^[0-9]+M"
Piccola nota:
Dato l'output di "df -h" ti perdi tutte le cartelle >= 1.0MiB e <= 9.9MiB ,
se non e' un comportamento voluto dovresti usare qualcosa come:
du -h|grep -E "^[[:digit:]]+([,.][[:digit:]])?M"
mi scuso per l'errore dovuto alla fretta.
--
Nicolo' Cristini
PGP Key id: 0xDED6220C
PGP Key fingerprint = 80F5 34DA 9759 C8C3 0385 5657 C3F0 D216 DED6 220C
-------------- parte successiva --------------
Un allegato non testuale รจ stato rimosso....
Nome: signature.asc
Tipo: application/pgp-signature
Dimensione: 198 bytes
Descrizione: Digital signature
URL: <http://lugbs.linux.it/pipermail/lug/attachments/20091009/047a92b3/attachment.pgp>
Maggiori informazioni sulla lista
Lug
|