This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr -sc 'A-Za-z' '\n' < filename.txt | sort | uniq | sort -d | |
tr 'A-Z' 'a-z' < filename.txt | tr -sc 'a-z' '\n'| sort | uniq | sort -d | less # normalizes to lowercase first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sort –d #dictionary order | |
sort –f #fold case | |
sort –n #numeric order | |
sort –nr #reverse numeric order | |
sort +1 #start with field 1 (starting from 0) | |
sort +0.50 #start with 50th character | |
sort +1.5 #start with 5th character of field |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr 'a-z' 'A-Z' < filename.txt | tr -sc 'BCDFGHJKLMNPQRSTVWXYZ' '\n' | sort | uniq -c | sort -nr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr 'a-z' 'A-Z' < filename.txt | tr -sc 'AEIOU' 'n' | sort | uniq -c | sort -nr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr 'a-z' 'A-Z' < filename.txt | tr -sc 'A-Z' 'n' | sort | uniq -c | sort -nr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr 'A-Z' 'a-z' < filename.txt | tr -sc 'a-z' '\n' | sort | uniq -c | sort -n -r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr -sc 'A-Za-z' '\n' < filename.txt | sort | uniq -c | sort -n -r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr -sc 'A-Za-z' '\n' < filename.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
for x | |
do | |
echo "Converting $x" | |
tr -d '\015' < "$x" > "tmp.$x" | |
mv "tmp.$x" "$x" | |
done |
NewerOlder