Linux Shell Script – Generating Random Numbers in Given Boundary #019 #shorts



Linux Shell Script – Generating Random Numbers in Given Boundary #019 #shorts

Linux Shell Script - Generating Random Numbers in Given Boundary #019 #shorts

👨🏼‍💻👨🏼‍💻👨🏼‍💻
Generate random numbers in Linux shell is by using the shuf command. This command (according to its manual page) generates random permutations and displays them one per line.
Syntax : shuf -i MIN-MAX -n COUNT

The /dev/urandom special device file can be used to generate random numbers. The idea is simple: The /dev/urandom uses the noise collected from the device drivers and other sources to generate random data. The od (octal dump) command can extract a number of bytes and displays their decimal equivalent.

#keeponcoding #programming #shorts #linux #scripting #coding #shell #terminal #commands #education #learning #learnlinux #ubuntu