|
|
|
|
|
by blueflow
1131 days ago
|
|
Find the problem: echo "$(tr -dc A-Za-z0-9 </dev/urandom | dd count=1 bs=16 2>/dev/null)"
^-- SC2005 (style): Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
I have experienced so many situations where shellcheck is giving harmful advice or warns me about the thing that is exactly my intention. |
|
The call to echo has a likely purpose is to trim some spaces from a string, but it's not at all obvious why this is done or what the benefit is. In the best case, it leaves the reader pondering this weird semi-no-op.
If you think shellcheck, and probably most readers, is wrong in this assertion, just speak your mind and let's learn from one another. But I certainly can't guess your intention here.