Geektool est un petit utilitaire qui permet d’afficher des fichiers, des images ou des commandes shell Mac sur votre bureau.
Je cherchez une manière de faire un affichage de citations aléatoirement dans une liste, voila ce que j’obtiens et cela marche.
num_quotes=9 # Génère un random rand=$[ ( $RANDOM % $num_quotes ) + 1 ] case $rand in 1) quote="Some things Man was never meant to know.\n For everything else, there's Google.";; 2) quote="Real programmers don't comment their code.\n It was hard to code, it should be hard to understand.";; 3) quote="There are 10 kinds of people in the world,\n and those that don't.";; 4) quote="My software never has bugs. It just develops random features.";; 5) quote="The only problem with troubleshooting\n is that sometimes trouble shoots back.";; 6) quote="If you give someone a program, you'll frustrate them for a day;\n if you teach them how to program you'll frustrate them for life.";; 7) quote="You know you're a geek when …\n You try to shoo a fly away from the monitor with your cursor.";; 8) quote="We all know Linux is great … it does infinite loops in 5 seconds.\n [Linus Torvalds]";; 9) quote="By golly, I'm beginning to think Linux really *is* the best thing since sliced bread.\n [Vance Petree]";; esac # Affichage echo "$quote"