Strange behavior of uniq on darwin shells
问题 I've used 'uniq -d -c file' in many shell scripts on linux machines, and it works. On my MAC (OS X 10.6.7 with developer tools installed) it doesn't seems to work: $ uniq -d -c testfile.txt usage: uniq [-c | -d | -u] [-i] [-f fields] [-s chars] [input [output]] It would be nice if anyone could checks this. 回答1: Well, it's right there in the Usage message. [ -c | -d | -u] means you can use one of those possibilities, not two. Since OSX is based on BSD, you can check that here or, thanks to