4 ms·
You can also do it entirely in sed: sed -E -e '/^[a-fio]{6}$/!d; y/abcdefioIO/ABCDEF1010/; s/^/#/' /usr/share/dict/words
by adrianmonk 4y ago
You can also do it entirely in sed:
sed -E -e '/^[a-fio]{6}$/!d; y/abcdefioIO/ABCDEF1010/; s/^/#/' /usr/share/dict/words
- xertopertha 4y agoThis produces 35 items. The grep version gives 93
- adrianmonk 4y agoYeah, I failed to make the pattern case insensitive. Here's a fixed version that also handles S/5: sed -E -e '/^[A-FIOSa-fios]{6}$/!d; y/abcdefiosIOS/ABCDEF105105/; s/^/#/' /usr/share/dict/words