Move all scripts to 'src' directory
This commit is contained in:
13
src/stopwatch.sh
Executable file
13
src/stopwatch.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# Simple stopwatch script that simply counts the elapsed time in seconds.
|
||||
|
||||
start=$(date +%s)
|
||||
|
||||
stty -echo # hide keyboard input
|
||||
|
||||
while [ true ]
|
||||
do
|
||||
time="$(($(date +%s) - $start))"
|
||||
printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"
|
||||
sleep 1s
|
||||
done
|
Reference in New Issue
Block a user