[Klug-general] sed - How to delete all but first occurrence?

Paul Littlefield info at paully.co.uk
Thu Jan 19 12:37:20 UTC 2012


On 19/01/12 10:47, David Halliday wrote:
> More Ideal would be to include only one instance of the unique error messages but I believe that will be a little more complicated and more time than it is worth (not to mention that a more complicated solution is harder to explain to people I'm working with).

cat /tmp/error.txt |grep '^error' |sort |uniq

Paully



More information about the Kent mailing list