mirror of
https://github.com/edu4rdshl/linuxscripts.git
synced 2026-07-17 23:24:52 +00:00
22 lines
437 B
Bash
22 lines
437 B
Bash
#!/usr/bin/env bash
|
|
|
|
nscopy() {
|
|
if [[ "$#" -ne 3 ]]; then
|
|
echo "Usage: nscopy machine-name host_source_path dest_path"
|
|
else
|
|
machinectl copy-to $1 $2 $3/${2##*/}
|
|
fi
|
|
}
|
|
|
|
nsretr() {
|
|
if [[ "$#" -ne 3 ]]; then
|
|
echo "Usage: nsretr machine-name machine_source_path host_dest_path"
|
|
else
|
|
machinectl copy-from $1 $2 $3/${2##*/}
|
|
fi
|
|
}
|
|
|
|
rs() {
|
|
local file=${1:-/dev/stdin}
|
|
curl --data-binary @${file} https://paste.rs
|
|
}
|