Add num_circle script to transform a number into a digit with a circle.
This commit is contained in:
parent
430473a8ad
commit
23fc091fc5
|
@ -8,6 +8,7 @@ Some useful scripts (for me) that can be added to $PATH :)
|
||||||
* firewall: A script shell to set some iptables rules.
|
* firewall: A script shell to set some iptables rules.
|
||||||
* update-dynmotd.d/: scripts to update the motd (via the /etc/update-motd.d directory).
|
* update-dynmotd.d/: scripts to update the motd (via the /etc/update-motd.d directory).
|
||||||
* flac_to_mp3: convert all flac files of a directory into mp3.
|
* flac_to_mp3: convert all flac files of a directory into mp3.
|
||||||
|
* num_circle: Transform a number into a digit with a circle.
|
||||||
* pomodoro: Print a task and a timer in a file. Try to apply Pomodoro Technique!
|
* pomodoro: Print a task and a timer in a file. Try to apply Pomodoro Technique!
|
||||||
* snapsend.sh: Send a ZFS snapshot to a remote host.
|
* snapsend.sh: Send a ZFS snapshot to a remote host.
|
||||||
* test_ssl3: Test if a website supportes the SSLV3 protocol.
|
* test_ssl3: Test if a website supportes the SSLV3 protocol.
|
||||||
|
@ -17,6 +18,12 @@ Some useful scripts (for me) that can be added to $PATH :)
|
||||||
* zenity_generator: Script to generate zenity window.
|
* zenity_generator: Script to generate zenity window.
|
||||||
* zfSnap.sh: Take snapshot of a ZFS pool.
|
* zfSnap.sh: Take snapshot of a ZFS pool.
|
||||||
|
|
||||||
|
### Num_circle
|
||||||
|
Tiny Bash script that take a number between 0 and 20 as argument and transform it into a digit with into a circle.
|
||||||
|
```sh
|
||||||
|
num_circle 18
|
||||||
|
⑱
|
||||||
|
```
|
||||||
|
|
||||||
### Pomodoro
|
### Pomodoro
|
||||||
My implementation of the Pomodoro Technique (https://en.wikipedia.org/wiki/Pomodoro_Technique).
|
My implementation of the Pomodoro Technique (https://en.wikipedia.org/wiki/Pomodoro_Technique).
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
circled_digit() {
|
||||||
|
circled_digits='⓪①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳'
|
||||||
|
if [ $1 -lt 20 ] 2>/dev/null ; then
|
||||||
|
printf '%b' "${circled_digits:$1:1}\n"
|
||||||
|
else
|
||||||
|
printf '%b' "Must give a number between 0 and 20. Not '$1'\n"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
circled_digit $1
|
Loading…
Reference in New Issue