Russell Coker wrote:
On Tuesday, 12 June 2018 10:29:51 AM AEST Trent W.
Buck wrote:
Russell Coker via luv-talk wrote:
egrep -i "^[a-folstq]{4}$"
/usr/share/dict/british-english-large
You really should be using IPv6 if possible. The above command can help
you find good IPv6 addresses.
-insane would seem more apropos.
There are a lot of insane people out there if that is the case.
I just meant it has more words.
egrep -i "^[a-folstq]{4}$"
/usr/share/dict/british-english-large|tr [A-Z]
[a- z]|tr [olstq] [01579]
Those [] are silly for tr.
Do you have a better suggestion to achieve the same result?
I just meant
tr A-Z a-z
not
tr '[A-Z]' '[a-z]'
i.e. you appear to be using tr wrong, but in a way that accidentally doesn't matter.
Also your lack of quoting will Do The Wrong Thing if $PWD contains single-letter files in
$PWD, e.g.
$ curl
example.com >a
$ echo Hello World | tr [A-Z] [a-z]
aello aorld
$ curl
example.net >b
$ git diff --no-index a b
$ echo Hello World | tr [A-Z] [a-z]
tr: extra operand ‘b’
$ echo Hello World | tr 'A-Z' 'a-z'
hello world
Now that I'm paying attention, egrep is deprecated (ref. man grep), and
you can use -x instead of ^$:
LC_CTYPE=C grep -xE '[a-folstq]{4}'