Add 'randoman' and 'randoaw' scripts

This commit is contained in:
samedamci 2020-05-19 13:38:27 +02:00
parent 3bc12b8e20
commit a9242aa69a
No known key found for this signature in database
GPG Key ID: FCB4A9A20D00E894
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"