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

Comments

Post Comment