The Ultimate Bash Array Tutorial with 15 Examples
15 个 Bash Array 数组教程
Select unique or distinct values from a list in UNIX shell script
./yourscript.ksh | sort | uniq
uniq
will output all lines exactly once
uniq -d
will output all lines that appear more than once, and it will print them once
uniq -u
will output all lines that appear exactly once, and it will print them once