Horje
count the number of unique elements in a column bash Code Example
count the number of unique elements in a column bash
# Example usage:
awk -F '\t' '{print $7}' input_file | sort | uniq -c
# Breakdown: 
# awk returns the 7th tab-delimited column/field of the input_file
# sort sorts the entries so that duplicate entries are adjacent
# uniq -c returns the counts of each type of element

# Note, add "| cut -c 9-" to remove the counts if you only want the
# 	unique values found in the column/field 




Shell

Related
rm except one file Code Example rm except one file Code Example
bash limit memory use of a function Code Example bash limit memory use of a function Code Example
windows usb serial number Code Example windows usb serial number Code Example
$? in shell script Code Example $? in shell script Code Example
node ace list routes Code Example node ace list routes Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
17