-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in `seq 1 ${1}`; | |
do | |
tput bel | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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