特定の単語で最も頻繁に使用される文字を検索[重複]

特定の単語で最も頻繁に使用される文字を検索[重複]
Input = 'RaamKuumabbbb'
Output = b

bは文字列A = 'RaamKuumabbbb'に4回表示されます。

ベストアンサー1

この試み

 Input='RaamKuumabbbb'
 output=(`echo $Input | grep -o . | sort | uniq -c | sort -nr | head -n1`)

 echo ${output[1]} appeared ${output[0]} times in the string $Input

おすすめ記事