Re:Ask HN: Have you created programs for only your personal ...
by stirfish on Wednesday April 13, 2022 @06:36PM
(#31021165)
Something like
(inb4 unnecessary use of `cat`)
[ Parent
| on HN ]
Re:Ask HN: Have you created programs for only your personal ...
by jmholla on Wednesday April 13, 2022 @09:20PM
(#31022362)
I use cat like this all the time. It means I can easily change whatever program I'm using to interact with the program (e.g. switching `tr` to `sed`).
Re:Ask HN: Have you created programs for only your personal ...
by yakubin on Thursday April 14, 2022 @08:56AM
(#31026327)
You can replace "cat /usr/share/dict |" in that invokation with "</usr/share/dict" and it will be equally easy to switch between tr and sed. Yes, you can put that redirection at the start, not just at the end of a command line. Although I admit I still haven't got used to doing it.
Re:Ask HN: Have you created programs for only your personal ...
by lucb1e on Wednesday April 13, 2022 @07:40PM
(#31021685)
I posted some advice in a sibling thread, <https://news.ycombinator.com/item?id=31021503>, that applies here as well:
> Please don't use $RANDOM or $((RANDOM)) or standard `shuf` for password generation. These RNGs are not cryptographically secure. Use input from /dev/urandom instead.
Re:Ask HN: Have you created programs for only your personal ...
by LeoPanthera on Wednesday April 13, 2022 @08:13PM
(#31021926)
You can do this with "shuf --random-source=/dev/urandom".
The same with gshuf.
I use an alias to add this switch by default.
Re:Ask HN: Have you created programs for only your personal ...
by lucb1e on Friday April 15, 2022 @08:01AM
(#31039190)
When using shuf for cryptographic purposes, I'd first check if it advertises as being able to be a secure cryptographic token generator when provided with a secure random source. It might very well use modulo operations, for example.
Re:Ask HN: Have you created programs for only your personal ...
by heyoni on Wednesday April 13, 2022 @06:53PM
(#31021299)
https://porkmail.org/era/unix/award
(Sorry I had to)