Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. #!/bin/sh
  2. # Record exit status of emerge–must precede ALL other commands!
  3. [ $? -eq 0 ] && RESULT=”PASS” || RESULT=”FAIL”
  4.  
  5. # Change next line to your mobile/SMS address
  6. SMS_ADDR=”2015551212@sms.some-mobile.com”
  7.  
  8. LAST_PKG=”$(tac /var/log/emerge.log | awk$2 == “>>>” {print $4,$5,$6,$7; exit;}’)”
  9. CFG_MODS=”$(find /etc -iname ‘._cfg????_*’ | wc -l)”
  10.  
  11. mail -s”Emerge Completed” $SMS_ADDR <<-EOM
  12. ${RESULT} ${LAST_PKG}
  13. :::
  14. ${CFG_MODS} config updates pending
  15. $*
  16. EOM

Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2010
Some API could be found at http://s-c.me/WS/HighLight.asmx