Skip to content

Instantly share code, notes, and snippets.

@McGeekiest
Created January 6, 2016 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McGeekiest/f7bb2279798c0ff30206 to your computer and use it in GitHub Desktop.
Save McGeekiest/f7bb2279798c0ff30206 to your computer and use it in GitHub Desktop.
chime: Have your remote server make a bell sound in your local terminal
#!/bin/bash
for i in `seq 1 ${1}`;
do
tput bel
done
#!/bin/bash
# Install `bel` if it is not yet installed
sudo apt-get install ncurses-bin
# Build our bash script in the /tmp directory
repcommand='`seq 1 ${1}`'
cat > /tmp/.chime.install <<EOF
#!/bin/bash
for i in ${repcommand};
do
tput bel
done
EOF
# Make the temporary script file executable
chmod +x /tmp/.chime.install
# Copy (as root) the temporary script file to /usr/local/bin
sudo cp /tmp/.chime.install /usr/local/bin/chime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment