Shellscript
Bash - The Original
This is the original code, should work with any shell.
#!/bin/sh echo "Arch is the best!"
~ lucke, 2008-05-14 12:53:49
Bash - Alternate
Handy for piping the output through your favourite IRC/IM/email client to tell the world how you feel about Arch!
#!/bin/sh yes Arch is the best!
~ Pierre, 2008-05-14 13:03:17
A GUI version.
You can't expect newbie-ubuntu-users to manage to run it in the CLI all on their own! So here is a GUI version, which has some GNOME dependencies for them.
#!/bin/sh /usr/bin/zenity --info --text "Arch is the best"
~ bavardage, 2008-05-14 14:01:48
A speedy Dash implementation
This checks the output of uname to decide if Arch is in use, and uses Dash because it's different from bash and it can.
#!/bin/dash tmpfile=/tmp/$$.best.dash;echo $(echo -n $(uname -r))|perl -e'chomp($_=<STDIN>);print;'>$tmpfile;check=$(perl -e 'print <STDIN>'<$tmpfile | grep '\-ARCH');if [ $check ];then echo "Arch is the best!";else clear;echo "Get a proper Distribution - Arch Linux is the best!";fi;rm $tmpfile
~ CuleX, 2008-05-14 14:09:05
Another Uname Implementation
You can use shell's regexps to adapt to a new kernel version: this will just check the presence of the string "ARCH"
#!/bin/bash arch=$(uname -r) if [[ "$arch" =~ "ARCH" ]]; then echo "Arch is the best!" else clear echo "Get a proper Distribution - Arch Linux is the best!" fi
~ danielsoft, 2008-05-14 14:10:44
Talking shell!
For the visually impaired. Requires the espeak package installed to work.
#!/bin/bash echo "Arch is the best" | espeak
~ finferflu, 2008-05-14 14:45:06
Critical Notification
Based on danielsoft's script, but using libnotify. Urgency set to "critical" because it is, of course, vital that the user should be aware of Arch's superiority.
#!/bin/sh
arch=$(uname -r)
if [[ "$arch" =~ "ARCH" ]]; then
notify-send -u critical 'Arch is the best!'
else
notify-send -u critical 'Get a proper distribution...' 'Arch is the best!'
fi
~ dunc, 2008-05-14 22:46:51