Nitpick: $RANDOM gives you an integer between 0 and 32767 (inclusive).
Re:More Things I Wish I’d Known About Bash
by xchaotic on Sunday January 21, 2018 @04:32PM
(#16200157)
this is from a guy writing abook on Docker, so I hope this is for a single purpose cointainer with now other users of THAT /tmp
Re:More Things I Wish I’d Known About Bash
by cryptonector on Monday January 22, 2018 @11:49AM
(#16205793)
it's a very dangerous pattern. Use mktemp(1) instead!
This has been a historic source of software vulnerabilities (often with the PID used instead as the guessable component instead of random, though). One recommended alternative is to use the `mktemp` command instead.