# ya, hacky hardcoded hostnames in 2023. we could do better
hssh-update() {
+ local -a failed_hosts
for host in kd x3.office.fsf.org syw; do
e $host
- scp /b/fai/fai/config/files/usr/local/bin/hssh/IANK root@$host:/usr/local/bin/hssh
+ if ! scp /b/fai/fai/config/files/usr/local/bin/hssh/IANK root@$host:/usr/local/bin/hssh; then
+ failed_hosts+=($host)
+ fi
done
+ if (( ${#failed_hosts[@]} >= 1 )); then
+ echo failed_hosts=${failed_hosts[*]}
+ return 1
+ fi
}
a() {
histrm() {
history -n
HISTTIMEFORMAT= history | awk -v IGNORECASE=1 '{ a=$1; sub(/^ *[^ ]+ */, "") }; /'"$*"'/'
- read -p "press anything but contrl-c to delete"
+ read -r -p "press anything but contrl-c to delete"
for entry in $(HISTTIMEFORMAT= history | awk -v IGNORECASE=1 '{ a=$1; sub(/^ *[^ ]+ */, "") }; /'"$*"'/ { print a }' | tac); do
history -d $entry
done