bin: add grepman

This commit is contained in:
xeruf 2021-05-20 12:15:04 +02:00
parent 11ede6a42a
commit 52d345fd99
2 changed files with 5 additions and 0 deletions

2
.local/bin/scripts/grepman Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
find /usr/share/man -name "*$1*" | xargs gunzip -c | grep $2 --color=auto

View File

@ -11,6 +11,9 @@ iptables -A chain-times -m owner --uid-owner janek -d 127.0.0.0/8 -j ACCEPT
time9=$(date -u -d "$(date -d 09:00)" +%k)
iptables -A chain-times -m owner --uid-owner janek -j DROP -m time \
--timestart $(date -u -d "$(date -d "${1:-15 min}")" +%k:%M) --timestop $(expr $time9 - 2):00
# TODO Only 10 minutes every hour, anything else needs justification
# Only allow periodical internet access in the morning
#iptables -A chain-times -m owner --uid-owner janek -j DROP -m time --weekdays 1-5 \
# --timestart $time9:20 --timestop $(expr $time9 + 1):00