Content added Content deleted
imported>mutante m (just a funny bash scripting example) |
imported>mutante mNo edit summary |
||
Line 50: | Line 50: | ||
taken from: http://www.linuxgazette.com/issue53/okopnik.html |
taken from: http://www.linuxgazette.com/issue53/okopnik.html |
||
let planets=19200; let myp=7;percent=`echo $myp/$planets | bc -l`;echo "w00t! you own $percent percent of all dg planets" |
Revision as of 13:13, 11 December 2004
#/bin/bash while [ hosting_party ] do case $FOOD_STATUS in potato_chips_gone) replace_potato_chips;; peanuts_finished) refill_peanut_bowl;; pretzels_gone) open_new_pretzel_bag;; ... ... esac if [ police_on_scene ] then talk_to_nice_officers continue fi case $LIQUOR_STATUS in vodka_gone) open_new_vodka_bottle;; rum_gone) open_new_rum_bottle;; ... ... esac case $ANALYZE_GUEST_BEHAVIOR in lampshade_on_head) echo "He's been drinking";; talking_to_plants) echo "She's been smoking";; talking_to_martians) echo "They're doing LSD";; levitating_objects) echo "Who spiked my lemonade??";; ... ... ... esac done echo "Dude... what day is it?"
taken from: http://www.linuxgazette.com/issue53/okopnik.html
let planets=19200; let myp=7;percent=`echo $myp/$planets | bc -l`;echo "w00t! you own $percent percent of all dg planets"