Aller au contenu

« Commandes bash fun » : différence entre les versions

De Marmits Wiki
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
=== Météo ===
==== Par défaut (3 jours). ====  
<syntaxhighlight lang="bash" copy>
<syntaxhighlight lang="bash" copy>
curl wttr.in/paris
curl wttr.in/paris
</syntaxhighlight>
</syntaxhighlight>


Résumé ultra-condensé : Paris: 🌦 +17°C.
==== Résumé ultra-condensé : Paris: 🌦 +17°C. ====
<syntaxhighlight lang="bash" copy>
<syntaxhighlight lang="bash" copy>
curl wttr.in/paris?format=3
curl "wttr.in/paris?format=3&lang=fr"
</syntaxhighlight>
</syntaxhighlight>
==== Données brutes (JSON) ====
<syntaxhighlight lang="bash" copy>
curl "wttr.in/paris?format=j1&lang=fr"
</syntaxhighlight>
==== Météo actuelle ====
<syntaxhighlight lang="bash" copy>
curl "wttr.in/paris?0&lang=fr"
</syntaxhighlight>
==== Affiche les nuits (pour + de détails). ====
<syntaxhighlight lang="bash" copy>
curl "wttr.in/paris?n&lang=fr"
</syntaxhighlight>
==== Affiche en français  ====
<syntaxhighlight lang="bash" copy>
curl "wttr.in/paris?lang=fr&v2"
</syntaxhighlight>
==== Affiche les phases de la Lune ====
<syntaxhighlight lang="bash" copy>
curl wttr.in/Moon
</syntaxhighlight>
==== Affiche une adresse précise avec les coordonnées GPS ====
<syntaxhighlight lang="bash" copy>
curl "wttr.in/48.8566,2.3522"
</syntaxhighlight>
==== Affiche un graphique détaillé ====
<syntaxhighlight lang="bash" copy>
curl "wttr.in/48.8566,2.3522?format=v2"
</syntaxhighlight>


=== qrencode ===
=== qrencode ===

Version du 29 mai 2025 à 00:24

Par défaut (3 jours).

curl wttr.in/paris

Résumé ultra-condensé : Paris: 🌦 +17°C.

curl "wttr.in/paris?format=3&lang=fr"

Données brutes (JSON)

curl "wttr.in/paris?format=j1&lang=fr"

Météo actuelle

curl "wttr.in/paris?0&lang=fr"

Affiche les nuits (pour + de détails).

curl "wttr.in/paris?n&lang=fr"

Affiche en français

curl "wttr.in/paris?lang=fr&v2"

Affiche les phases de la Lune

curl wttr.in/Moon

Affiche une adresse précise avec les coordonnées GPS

curl "wttr.in/48.8566,2.3522"

Affiche un graphique détaillé

curl "wttr.in/48.8566,2.3522?format=v2"


qrencode

Génère un QR code en terminal.

echo "https://example.com" | qrencode -t ANSI

Ecran de hacker

sudo apt install hollywood

Inverse un text

echo "un texte" | rev

Dé de 1 à 6

echo $((1 + RANDOM % 6))  # Dé entre 1 et 6

Compte à rebours

for i in {5..1}; do echo "$i..." && sleep 1; done; echo "Boom!"

Fake "hacking"

cat /dev/urandom | hexdump -C | grep 'ca fe'

Star Wars ASCII

telnet towel.blinkenlights.nl

Magic 8-Ball

answers=("Oui" "Non" "Peut-être" "Demande plus tard")
echo "${answers[$((RANDOM % 4))]}"

Factorise un nombre

factor 42  # Affiche "42: 2 3 7"

Un train qui traverse ton terminal (quand tu fais une faute de frappe sl au lieu de ls)

sl

ou avec une aide

sl -a

cowsay

cowsay "Hello, World!"

ou

cowsay -f dragon "I am a dragon! RAWR!"