[OTW] Grep vs SED

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

 



(Off the Wall Question) I have been asked:

Given a very large file.txt and a desire to remove a matching line:

	$ grep -v matching_line file.txt > file.txt.new

or;

	$ sed '/matching_line _RegEx/d'  file.txt > file.txt.new

Which method is more efficient or is it a tossup?

-- 
Our DNSRBL - Eliminate Spam: http://www.TQMcube.com
Multi-RBL Check: http://www.TQMcube.com/rblcheck.php
The Dirty Dozen Spammiest Ranges: http://tqmcube.com/dirty12.php

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux