https://stackoverflow.com/questions/8273636/add-blank-line-after-every-result-in-grep
Perl solution :
grep blah files | perl -F: -ap -e 'print "\n" if $f ne $F[0]; $f = $F[0];'
And you're done.
-F : specify the character to be used for the split (space by default)
-a : autosplit into @F
No comments:
Post a Comment