A file which has some duplicate numbers present in a column and if we need distinct values ,the following unix command can be used
$ > sort filename | uniq
Example: number.txt contains the following values
1
2
3
2
1
then the command sort number.txt |uniq willl result in
1
2
3
For more info,please refer
http://www.unix.com/shell-programming-scripting/77138-awk-print-distinct-col-values.html
1 comment:
Nice Article. Some examples on find command
Post a Comment