Last active
February 11, 2025 11:02
-
-
Save dewomser/5fecba0fcb82ba08443495e9ded45d70 to your computer and use it in GitHub Desktop.
How many astronauts in space ? Bash 1-liner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#!/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