Hi gurus, uniq -c uses space to separate counts from lines since 2003, as this is required by posix. I understand that you want to stay compatible with posix, but why is there not option to change this behaviour, to make uniq behave like cut or sort? This would make combining uniq -c with tools like gawk, sort or cut much easier. Patrick Tufts already proposed this (I only found it here: http://www.opensubscriber.com/message/bug-coreutils@gnu.org/5107663.html) and Bob Proulx wanted examples, so here is my standard example:
Let's say I only want the 50 most common lines of a file: cat textfile | sort | uniq -c | sort -n | tail -n 50 | tr -s ' ' | cut -f2 This will only print the first word of each line with the current uniq version though if uniq -c understood -d/-t it would print the whole This is just a proposition for a feature that would make uniq more homogenous. Debian documents that "--separator" was actually patched into the debian version of uniq in the coreutils package, but the patch has been removed, I guess the coreutils developers at the time didn't find this change useful enough. Is there any good reason not to include such an option? thanks Max _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils