🤖
Guides
  • Introduction
  • Beginners
    • Getting Started
  • Guides
    • SQLi Walkthrough
    • My First BoF
    • OSCP Buffer Overflow Guide (Windows)
    • Parrot OS customisation
    • Terminal Customisation
    • Video Guides
  • Cheat Sheets
    • Reverse Shells
    • Tunnelling, Pivoting and Proxies
    • SQL Injection
      • WAF Bypass
      • SQLMap
      • DBMS Cheatsheets
        • MSSQL
        • MySQL
        • Oracle
        • SQLite
        • PostgreSQL
      • References
    • Bash Cheat Sheets
      • Terminal
      • Find
      • Grep
      • Sed
      • Awk
      • Xargs
      • System
      • Download
      • Networking
      • Hardware
      • Variable
      • Math
      • Data Manipulation
      • Random
      • Time
      • Condition and Loop
      • Other
    • OSINT
    • Ping Sweeps
  • Methodologies
    • VOIP Checklist
    • OWASP v4 Checklist
    • External Inf
    • Internal Infrastructure
  • Linux
    • Checklist - Linux Priv Esc
  • Windows
    • Checklist - Windows Priv Esc
  • Things to do/look at
Powered by GitBook
On this page
  • Random
  • Random generate password (e.g. generate 5 password each of length 13)
  • Random pick 100 lines from a file
  • Random order (lucky draw)
  • Echo series of random numbers between a range (e.g. shuffle numbers from 0-100, then pick 15 of them randomly)
  • Echo a random number
  • Random from 0-9
  • Random from 1-10

Was this helpful?

  1. Cheat Sheets
  2. Bash Cheat Sheets

Random

Random

Random generate password (e.g. generate 5 password each of length 13)

sudo apt install pwgen
pwgen 13 5
#sahcahS9dah4a xieXaiJaey7xa UuMeo0ma7eic9 Ahpah9see3zai acerae7Huigh7

Random pick 100 lines from a file

shuf -n 100 filename

Random order (lucky draw)

for i in a b c d e; do echo $i; done | shuf

Echo series of random numbers between a range (e.g. shuffle numbers from 0-100, then pick 15 of them randomly)

shuf -i 0-100 -n 15

Echo a random number

echo $RANDOM

Random from 0-9

echo $((RANDOM % 10))

Random from 1-10

echo $(((RANDOM %10)+1))
PreviousData ManipulationNextTime

Last updated 4 years ago

Was this helpful?