Paul Jarc wrote: > [EMAIL PROTECTED] wrote: > > How can I instruct uniq to ignore blank lines? > > Do you mean you want them to be removed entirely, or preserved even > when there are multiple consecutive ones? > > > paul
Not removed entirely from the file itself, but from the output of the uniq utility report. I keep a textfile in which to give visual emphasis to some lines I duplicate them a few times. I want to use uniq utility to make a little report of the duplicate contents of the file, so far I know I need to use something like uniq -c -d file But the problem is that it reports the leading lines too. I found a sortu utility online that has a -b option to ignore blank lines but i'd rather use the standard ones. I just did a piping sort file | uniq -c -d | sort -r This gives me the duplicated lines in my file sorted by how many times they're duplicated, but the first item I get are how many blank lines there are in my file, which I don't need to know. Can I improve on this? _______________________________________________ help-gnu-utils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gnu-utils
