User Tools

Site Tools


task_boiler

This is an old revision of the document!


task boiler

Place to cook the tasks. Once they are boiled enough, move them to a separate plate.

Start the first heading with “=====”

remove lines with duplicate letters

Task

Find five letter words that are made up of letters {h, i, k, e, r, s} where each letter appears only once.

Issue

If we do

grep -i "^[hikers][hikers][hikers][hikers][hikers]$" /usr/share/dict/american-english
<code>
shows
<code>
Essie
Hesse
Irish
Kerri
Reese
Sheri
...

some of the words have the letters duplicated. For example, in 'Irish' the letter 'i' is repeated twice. Such words should be filtered out.

Solution

 % grep -i "^[hikers][hikers][hikers][hikers][hikers]$" /usr/share/dict/american-english | grep -viE '(.).*\1' 
Sheri
Shrek
heirs
hiker
hikes
hires
sheik
shire
shirk
skier
task_boiler.1691764585.txt.gz · Last modified: 2023/08/11 14:36 by raju