10 choses à faire avec la ligne de commande
De an
Sommaire
- 1 Introduce yourself
- 2 What time is it in Sao Paulo at 18:47 in Brussels?
- 3 Get the alphabetical list of words in a text
- 4 Do a cadavre exquis of several texts
- 5 Make a top 5 of your fattest files
- 6 Create an animated gif of system icons
- 7 Make a randomized playlist of a sound sytem and listen relax
- 8 Make a parody of Wikipedia
- 9 Make a poem out of your computer memory
- 10 Rank the commands by popularity
Introduce yourself
echo I am `whoami`. It is `date` and we are on $HOST, in the directory `pwd` | espeak
What time is it in Sao Paulo at 18:47 in Brussels?
TZ=America/Sao_Paulo date "+%F %R (%Z%z)" -d 'TZ="Europe/Brussels" 18:47'
Get the alphabetical list of words in a text
cat text.txt | tr " " "\n" | sort | uniq
Do a cadavre exquis of several texts
cat a.txt b.txt c.txt > abc.txt
Make a top 5 of your fattest files
ls -l -S *.* | head -5
Create an animated gif of system icons
convert /usr/share/pixmaps/*.{png,xpm} /tmp/animated.gif
Make a randomized playlist of a sound sytem and listen relax
find /usr/share/sounds/ -type f | shuf > /tmp/playlist.list && mplayer -playlist /tmp/playlist.list
Make a parody of Wikipedia
wget -k -O /tmp/o.html https://en.wikipedia.org/wiki/BNP_Paribas && sed -i "s/\w\+ing/schtroumpfing/gi" /tmp/o.html
Make a poem out of your computer memory
sudo dd if=/dev/mem 2> /dev/null | cat | strings | shuf | head
Rank the commands by popularity
history | awk '{print $2}' | sort | uniq -c | sort -rn | head