Add 'randoman' and 'randoaw' scripts

This commit is contained in:
Wiktor Zykubek 2020-05-19 13:38:27 +02:00
parent afcd9a49e0
commit 91d3248134
2 changed files with 11 additions and 0 deletions

6
.local/bin/scripts/randoman Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# Open random man page.
man "$(a="$(shuf -i 1-"$(man -k . | wc -l)" -r -n 1)" && man -k . | \
awk -v v="$a" 'NR==v {print $1}')"

5
.local/bin/scripts/randomaw Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
# Open random Arch Wiki page in w3m.
w3m "https://wiki.archlinux.org/index.php/Special:Random"