Example sort, cut & uniq command
cut -f1 -d: passwd |sort|uniq
it will cut the first field in passwd file & sort with according to alphabets & only show the unique names.
cut -f3 -d: passwd |sort -n|uniq
it will cut the 3rd field in passwd file & sort according to the numeric numbers & show the unique numbers only.
it will cut the first field in passwd file & sort with according to alphabets & only show the unique names.
cut -f3 -d: passwd |sort -n|uniq
it will cut the 3rd field in passwd file & sort according to the numeric numbers & show the unique numbers only.
Comments
Post a Comment