Skip to content

Instantly share code, notes, and snippets.

@dewomser
Last active February 11, 2025 11:02
Show Gist options
  • Save dewomser/5fecba0fcb82ba08443495e9ded45d70 to your computer and use it in GitHub Desktop.
Save dewomser/5fecba0fcb82ba08443495e9ded45d70 to your computer and use it in GitHub Desktop.
How many astronauts in space ? Bash 1-liner
#!/bin/bash
#curl -ks http://api.open-notify.org/astros.json|jq '[.[] ] | .[-2]'
#Toot to Mastodon
a=$(curl -ks http://api.open-notify.org/astros.json|jq '[.[] ] | .[-2]')
d=$(date)
echo -e "Heute am $d sind $a Astronauten im Weltall\n Und hier gibts das Skript https://gist.github.com/dewomser/5fecba0fcb82ba08443495e9ded45d70" | toot post
@dewomser
Copy link
Author

dewomser commented Nov 9, 2024

#!/bin/bash
#spacemen's names and stations

a=$(curl -ks http://api.open-notify.org/astros.json)
b="$(echo $a|jq '.people[] | [.craft, .name] | @csv' | tr -d '\"')"
echo -e "Im Weltraum sind:\n$b\nQuelle: https://gist.github.com/dewomser/5fecba0fcb82ba08443495e9ded45d70 " |toot post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment