Initial commit of utility scripts
This commit is contained in:
parent
ac77586a15
commit
1faeefffd7
34 changed files with 1328 additions and 1 deletions
20
bin/daily_scripture.sh
Executable file
20
bin/daily_scripture.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Define the input file
|
||||
input_file="$HOME/docs/kjv.txt"
|
||||
|
||||
# Generate a unique identifier based on the current date
|
||||
date=$( date +%Y%m%d )
|
||||
|
||||
# Generate random data with a seed
|
||||
get_seeded_random()
|
||||
{
|
||||
seed="$1"
|
||||
openssl enc -aes-256-ctr -pass pass:"$seed" -nosalt \
|
||||
</dev/zero 2>/dev/null
|
||||
}
|
||||
|
||||
random_line=$(shuf -n 1 --random-source=<(get_seeded_random "$date") $input_file)
|
||||
|
||||
# Print the randomly selected line
|
||||
echo "$random_line"
|
Loading…
Add table
Add a link
Reference in a new issue