Sono nuovo a sed
e ho la seguente domanda. In questo esempio:righe di eliminazione sed che non contengono una stringa specifica
some text here
blah blah 123
another new line
some other text as well
another line
voglio cancellare tutte le linee ad eccezione di quelli che contengono stringa 'testo' e o la stringa 'bla', quindi il mio file di output è simile al seguente:
some text here
blah blah 123
some other text as well
Qualche suggerimento su come questo può essere fatto usando sed
?
Must la risposta usa sed? grep lo farebbe molto facilmente. – Tim