linux_wiki:bash_scripting_snippets

This is an old revision of the document!


Bash Scripting Snippets

General Information

Bash scripting references and snippets.

Checklist

  • Distro agnostic

Random Numbers

Different ways to generate random numbers.

Random 2 Digit Number

echo ${RANDOM:0:2}


Random number that is a minimum of 1 and max of 100

echo $[ (RANDOM % 100) + 1]

  • linux_wiki/bash_scripting_snippets.1529176645.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)