Skip to content

Instantly share code, notes, and snippets.

@firexcy
Created March 27, 2023 23:21
Show Gist options
  • Save firexcy/75ffe0cc7707d6f5d506206b06b9dca1 to your computer and use it in GitHub Desktop.
Save firexcy/75ffe0cc7707d6f5d506206b06b9dca1 to your computer and use it in GitHub Desktop.
pwgen.sh
#!/bin/bash
main() {
part1=$(pick)
part2=$(pick)
part3=$(pick)
part1a=$(echo "$part1" | tr 'aeiost' '431057' | tr '[:lower:]' '[:upper:]')
part2a=$(echo "$part2" | tr 'aceist' '@(&!$+')
echo "$part1a-$part2a-$part3"
echo "$part1 $part2 $part3"
}
pick() {
cat <<EOF | shuf -n 1
able
about
above
abroad
accept
access
accuse
across
action
active
actor
actual
adapt
admire
admit
adopt
adult
advice
advise
affair
affect
afford
afraid
after
again
agency
agenda
agent
agree
ahead
alarm
album
alive
allow
almost
alone
along
also
alter
always
amazed
among
amount
anger
angle
angry
animal
ankle
annoy
annual
answer
anyone
anyway
apart
appeal
appear
apple
apply
april
area
argue
arise
armed
arms
army
around
arrest
arrive
artist
aside
asleep
aspect
assess
assist
assume
attach
attack
attend
august
aunt
author
avoid
award
aware
away
awful
baby
back
badly
bake
ball
banana
band
bank
base
based
basic
basis
bath
battle
beach
bean
bear
beat
beauty
become
beef
beer
before
begin
behave
behind
being
belief
bell
belong
below
belt
bend
bent
best
better
beyond
bike
bill
bird
birth
bite
bitter
black
blame
blank
blind
block
blog
blond
blood
blow
blue
board
boat
body
boil
bomb
bond
bone
book
boot
border
bored
boring
born
borrow
boss
both
bother
bottle
bottom
bowl
brain
branch
brand
brave
bread
break
breast
breath
bride
bridge
brief
bright
bring
broad
broken
brown
brush
bubble
budget
build
bullet
bunch
burn
bury
bush
busy
butter
button
cable
cafe
cake
call
calm
camera
camp
campus
can
cancel
cancer
candy
cannot
card
care
career
carpet
carrot
carry
case
cash
cast
catch
cause
cell
cent
center
chain
chair
chance
change
charge
chart
chat
cheap
cheat
check
cheese
chef
chest
chief
child
chip
choice
choose
church
circle
cite
city
civil
claim
class
clause
clean
clear
clerk
clever
click
client
climb
clock
close
closed
closet
cloth
cloud
club
clue
coach
coal
coast
coat
code
coffee
coin
cold
color
column
come
comedy
commit
common
cook
cookie
cool
copy
core
corn
corner
cost
cotton
could
count
county
couple
course
court
cousin
cover
crash
crazy
cream
create
credit
crew
crime
crisis
critic
crop
cross
crowd
cruel
cure
curly
curve
curved
custom
cycle
daily
damage
dance
dancer
danger
dark
data
date
dead
deal
dear
death
debate
debt
decade
decent
decide
deep
deeply
defeat
defend
define
degree
delay
demand
deny
depend
depth
desert
design
desire
desk
detail
detect
device
diary
diet
dinner
direct
dirt
dirty
dish
disk
divide
doctor
dollar
donate
door
double
doubt
down
dozen
draft
drag
drama
draw
dream
dress
drink
drive
driver
drop
drug
drum
drunk
during
dust
duty
each
early
earn
earth
easily
east
easy
edge
edit
editor
effect
effort
eight
eighty
either
elect
eleven
else
email
emerge
employ
empty
enable
ending
enemy
energy
engage
engine
enjoy
enough
ensure
enter
entire
entry
equal
error
escape
essay
estate
euro
even
event
ever
every
evil
exact
exam
except
excuse
exist
exit
expand
expect
expert
export
expose
extend
extent
extra
face
fact
factor
fail
fair
fairly
faith
fall
false
family
famous
fancy
farm
farmer
fast
fasten
father
fault
favor
fear
feed
feel
fellow
female
fence
fever
field
fifth
fifty
fight
figure
file
fill
film
final
find
fine
finger
finish
fire
firm
first
fish
five
fixed
flag
flame
flash
flat
flight
float
flood
floor
flour
flow
flower
flying
focus
fold
folk
follow
food
foot
force
forest
forget
fork
form
formal
former
forty
found
four
fourth
frame
free
freeze
fresh
friday
friend
frog
from
front
frozen
fruit
fuel
full
fully
fund
funny
future
gain
game
gang
garage
garden
gate
gather
genre
gentle
ghost
giant
gift
girl
give
glad
glass
global
glove
goal
gold
golf
good
goods
govern
grab
grade
grain
grand
grant
grass
gray
great
green
greet
ground
group
grow
growth
guard
guess
guest
guide
guilty
guitar
habit
hair
half
hall
hand
handle
hang
happen
happy
hard
hardly
harm
hate
have
head
health
hear
heart
heat
heaven
heavy
heel
height
hell
hello
help
here
hero
hers
hide
high
highly
hill
hire
hobby
hockey
hold
hole
hollow
holy
home
honest
honor
hope
horror
horse
host
hotel
hour
house
huge
human
humor
hungry
hunt
hurry
hurt
idea
ideal
ignore
image
impact
imply
import
impose
inch
income
indeed
indoor
inform
injure
injury
inner
insect
inside
insist
intend
into
invent
invest
invite
iron
island
issue
item
itself
jacket
jazz
jeans
join
joke
judge
juice
july
jump
june
junior
just
keep
kick
kill
kind
king
kiss
knee
knife
knock
know
label
labor
lack
lady
lake
lamp
land
laptop
large
last
late
later
latest
laugh
launch
lawyer
layer
lazy
lead
leader
leaf
league
lean
learn
least
leave
left
legal
lemon
lend
length
less
lesson
letter
level
lie
life
lift
light
like
likely
limit
line
link
lion
liquid
list
listen
little
live
lively
living
load
loan
local
locate
lock
lonely
long
look
loose
lord
lose
loss
lost
loud
loudly
love
lower
luck
lucky
lunch
lung
luxury
magic
mail
main
mainly
major
make
male
mall
manage
manner
many
march
mark
market
marry
mass
master
match
math
matter
maybe
mayor
meal
mean
means
meat
media
medium
meet
melt
member
memory
mental
menu
mess
metal
meter
method
middle
might
mild
mile
milk
mind
mine
minor
mirror
miss
mixed
model
modern
modify
moment
monday
money
monkey
month
mood
moon
moral
more
most
mostly
mother
motor
mount
mouse
mouth
move
movie
much
murder
muscle
museum
music
must
myself
nail
name
narrow
nation
native
nature
near
nearly
neat
neck
need
needle
nerve
never
news
next
nice
night
nine
ninety
nobody
noise
noisy
none
normal
north
nose
note
notice
notion
novel
number
nurse
obey
object
obtain
occur
ocean
offend
offer
office
often
once
onion
online
only
onto
open
oppose
option
orange
order
organ
origin
other
ought
ours
outer
oven
over
owner
pace
pack
page
pain
paint
pair
palace
pale
panel
pants
paper
parent
park
part
partly
party
pass
past
path
peace
pencil
penny
people
pepper
period
permit
person
phase
phone
photo
phrase
piano
pick
piece
pile
pilot
pink
pipe
pitch
place
plain
plan
plane
planet
plant
plate
play
player
please
plenty
plot
plus
pocket
poem
poet
poetry
point
poison
police
policy
polite
pool
poor
port
pose
post
poster
potato
pound
pour
powder
power
praise
pray
prayer
prefer
press
pretty
price
priest
prime
prince
print
prison
prize
profit
proof
proper
proud
prove
public
pull
punish
pure
purple
pursue
push
queen
quick
quiet
quit
quite
quote
race
racing
radio
rain
raise
range
rank
rapid
rare
rarely
rate
rather
reach
react
read
reader
ready
real
really
reason
recall
recent
recipe
record
reduce
refer
regard
region
regret
reject
relate
relax
relief
rely
remain
remark
remind
remote
remove
rent
repair
repeat
reply
report
rescue
resist
resort
rest
result
retain
retire
return
reveal
review
revise
reward
rhythm
rice
rich
ride
right
ring
rise
risk
river
road
robot
rock
role
roll
roof
room
root
rope
rough
round
route
row
royal
rubber
rude
rule
runner
rural
rush
sadly
safe
safety
sail
sailor
salad
salary
sale
salt
same
sample
sand
sauce
save
saving
scale
scan
scared
scary
scene
school
score
scream
screen
script
search
season
seat
secret
sector
secure
seed
seek
seem
select
self
sell
senate
send
senior
sense
series
serve
settle
seven
severe
sexual
shade
shadow
shake
shall
shame
shape
share
sharp
sheep
sheet
shelf
shell
shift
shine
shiny
ship
shirt
shock
shoe
shoot
shop
short
shot
should
shout
show
shower
shut
sick
side
sight
sign
signal
silent
silk
silly
silver
simple
simply
since
sing
singer
single
sink
sister
site
sixty
size
skiing
skill
skin
skirt
slave
sleep
slice
slide
slight
slip
slope
slow
slowly
small
smart
smell
smile
smoke
smooth
snake
snow
soap
soccer
social
sock
soft
soil
solar
solid
solve
some
song
soon
sorry
sort
soul
sound
soup
source
south
space
speak
speech
speed
spell
spend
spicy
spider
spirit
split
spoken
spoon
sport
spot
spread
spring
square
stable
staff
stage
stair
stamp
stand
star
stare
start
state
statue
status
stay
steady
steal
steel
steep
step
stick
sticky
stiff
still
stock
stone
stop
store
storm
story
stove
stream
street
stress
strict
strike
string
strong
studio
study
stuff
stupid
style
submit
subway
such
sudden
suffer
sugar
suit
summer
sunday
supply
sure
surely
survey
swear
sweep
sweet
swim
switch
symbol
system
table
tablet
tail
take
tale
talent
talk
tall
tank
tape
target
task
taste
taxi
teach
team
tear
tell
tend
tennis
tent
term
test
text
than
thank
thanks
that
their
theirs
them
theme
then
theory
there
they
thick
thief
thin
thing
think
third
thirty
this
though
threat
three
throat
throw
thus
ticket
tight
till
time
tiny
tire
tired
title
today
toilet
tomato
tone
tongue
tool
tooth
topic
total
touch
tough
tour
toward
towel
tower
town
track
trade
train
trash
travel
treat
tree
trend
trial
trick
trip
truck
true
truly
trust
truth
tube
tune
tunnel
turn
twelve
twenty
twice
twin
type
ugly
unable
uncle
under
unfair
union
unique
unit
united
unless
unlike
until
update
upon
upper
upset
upward
urban
urge
used
useful
user
usual
valley
value
vary
vast
venue
very
victim
video
view
viewer
virus
vision
visit
visual
vital
voice
volume
vote
wage
wait
waiter
wake
walk
wall
want
warm
warn
wash
waste
watch
water
wave
weak
wealth
weapon
wear
week
weigh
weight
well
west
what
wheel
when
where
which
while
white
whole
whom
whose
wide
widely
wife
wild
will
wind
window
wine
wing
winner
winter
wire
wise
wish
with
within
woman
wonder
wood
wooden
wool
word
work
worker
world
worry
worse
worst
worth
would
wound
wrap
write
writer
wrong
yard
yeah
year
yellow
young
your
yours
youth
zero
zone
EOF
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment