Cancellare una particolare linea in un file con sed

From RVM Wiki
Revision as of 08:12, 26 May 2009 by Gabriele.vivinetto (talk | contribs) (New page: Questo comando cancella tutte le righe nel file /tmp/data.txt che contengono la stringa "Windows": sed -i '/Windows/d' /tmp/data.txt Lo switch '''-i''' fa si che il file venga editato "...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Questo comando cancella tutte le righe nel file /tmp/data.txt che contengono la stringa "Windows":

sed -i '/Windows/d' /tmp/data.txt

Lo switch -i fa si che il file venga editato "in place".

Riferimenti