Skip to content

Instantly share code, notes, and snippets.

@mb6ockatf
Created March 21, 2024 15:52
Show Gist options
  • Save mb6ockatf/769d2fa61de60676564a128553f44100 to your computer and use it in GitHub Desktop.
Save mb6ockatf/769d2fa61de60676564a128553f44100 to your computer and use it in GitHub Desktop.
iss coords writer in bash
while [ 1 ]
do
p=$(date +%Y)/$(date +%m)/$(date +%d)/$(date +%H)
mkdir -p $p
out=$p/$(date +%s).txt
curl "http://api.open-notify.org/iss-now.json" > $out
git add -A
git commit -m "changed $(date +%s)"
git push
date
sleep 60
#find . -name "*.txt" -mmin 3 -delete
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment