added cpb bash command

This commit is contained in:
2024-03-31 18:26:29 -05:00
parent 3a9f5787ed
commit b305db8c52

View File

@@ -179,6 +179,22 @@ if [[ -f /etc/apt/keyrings/docker.gpg ]]
echo "alias lzd='lazydocker'" >> /etc/bash.bashrc
fi
# create copy of file before editing
if [[ ! -f /usr/local/bin/cpb ]]; then
cat <<'EOF' >> /usr/local/bin/cpb
#!/bin/bash
if [ $# -eq 1 ]
then
cp -pvi "$1" "${1}.bak"
else
echo "Info: $0 copies to a backup file"
echo "Usage: $0 <file to be backed up with .bak extension>"
fi
EOF
chmod +x /usr/local/bin/cpb
fi
# create tmux config
rm /etc/tmux.conf* > /dev/null 2>&1
echo "unbind C-b" >> /etc/tmux.conf