corz.org text viewer..
[currently viewing: /public/linux/usr/local/bin/scr.sh - raw]
#!/bin/bash
#
#  capture a screenshot..
#
#        usage:
#        scr [output filename (optional)]
#    
#        note:    if a filename isn't specified, scr defaults to ~/screenshot.raw
#                which is a file called "screenshot.raw" in your home folder
#
#  the screen capture is saved as a three channel (RGB) interleaved 
#  bitmap image with BGR ordering and a 0 byte header.
#
#  have fun!
#
#  ;o)
#  (or @ corz.org 2005
#

if [ "$1" = '-h' ]; then echo; echo "usage: src [<output filename>]"; echo; exit; fi
if [ "$1" = '' ]; then out=~/screenshot.raw; else out=$1; fi

cat /dev/fb0 > ${out}

echo
echo "screenshot saved to $out"
echo

Welcome to corz.org!

If something isn't working, I'm probably improving it, try again in a minute. If it's still not working, please mail me!