added cpb bash command
This commit is contained in:
16
debian/debian-essentials.sh
vendored
16
debian/debian-essentials.sh
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user