add cssh command
auto download and apply bash_aliases on server
This commit is contained in:
@@ -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 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 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 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
|
# git
|
||||||
|
|||||||
Reference in New Issue
Block a user