How can I count most occuring sequence of 3 letters within a word with a bash script
问题 I have a sample file like XYZAcc ABCAccounting Accounting firm Accounting Aco Accounting Acompany Acoustical consultant Here I need to grep most occurring sequence of 3 letters within a word Output should be acc = 5 aco = 3 Is that possible in Bash? I got absolutely no idea how I can accomplish it with either awk, sed, grep. Any clue how it's possible... PS: no output because I got no idea how to do that, I dont wanna wrote unnecessary awk -F, xyz abc... that not gonna help anywhere... 回答1: