Sort a text file
Sort a text file
sort sampleIDs.txt > sampleIDs_sorted.txt
get unique list of sorted text elements
sort -u sampleIDs.txt > sampleIDs_unique_sorted.txt
Word frequencies
Word frequencies
Get for each element (word/string) in a list the frequency of it's occurrence (sorted)
# Count the number of repeats for each ID in the list
sort sampleIDs.txt | uniq -c | awk '{print $2"\t"$1}' | sort -rnk 2
Sorted list of files
Sorted list of files
Sorting list of files
ls *.txt | sort