add cssh command

auto download and apply bash_aliases on server
This commit is contained in:
2024-01-06 17:30:24 +01:00
parent 78d20f7056
commit 2b2722d897

View File

@@ -70,6 +70,11 @@ function mtail { tail -f ${@:1} | stdbuf -o0 awk '/^==> / {a=substr($0, 5, lengt
function json_validator { python3 -mjson.tool "$1" > /dev/null && echo "Valid JSON!" || echo "JSON validation FAILED!"; }
function checkpy { pyflakes "$1"; pycodestyle --ignore=E402 --ignore=W503 --max-line-length=120 "$1"; deactivate; echo "Done"!; }
function random-string { if ! [ -z "$1" ]; then len=$1; else len=32; fi; cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1 | cut -c -$len; }
function cssh(){
ssh $@ -t 'cd $HOME ;
wget -O .spezi.bash_aliases --quiet -N "https://git.ip.spezi.it/Spezi/dotfiles/raw/branch/main/bash_aliases" ;
bash --rcfile $HOME/.spezi.bash_aliases'
}
# ===
# git