Basic scripts I found or wrote to utilize the shell's wonderful capabilities
- scripts that use the
beepcommand need the pc-speaker to work - in ubuntu that means you have tosudo modprobe pcspkrfirst - to execute them you may have to make them executable by
sudo chmod +x $FILENAME - if you include the functions into your .bashrc, .zshrc, .foorc you can omit the #!/bin/bash at the beginning and the call of the functions itself at the end of the scripts
- rename the "main"-functions or alias them to use your own command that you can remember ;-)
- Usage
timer $x($x = seconds to count down from) - Result: A countdown of the given number of seconds will be executed. When it's finished an alarm sound will be played.
- Usage:
weather $x($x = location to show weather forecast for) - Result: wttr.in will be asked for the weather forecast of the given location. The forecast is printed to the console.
- Usage:
timeDelta $x($x = any shell command including parameters to measure execution time for) - Result: The provided shell command is executed and the time it took is printed to the console.
- Dependencies:
libttspico-utils(includes pico2wave for speech synthesis) - Usage:
- Add
@hourly /home/prometheus/shellscripts/speak-time.sh >/dev/null 2>&1to your crontab (edit it withcrontab -e) - Add
XDG_RUNTIME_DIR=/run/user/1000to your crontab with your user ID (get your user id withidand substitute the '1000' with it)
- Add
- Result: The hour of the current time is spoken every hour
- Usage:
- rename the file and remove the
.pyfile extension - make the file executable (by using
chmod +x my-public-ip) - get your public ip's by running
./my-public-ip
- rename the file and remove the
- Result: Your public ipv4 and ipv6 are printed to STDOUT
Since Signal Desktop does not provide an export I created this script for archiving your Signal messages.
- Result: Backup of your Signal database as
sqliteandcsv - Hint: Only the messages synchronized with your desktop client can be exported