#!/bin/bash # (c) 2006 proteus, released under the GPL 2.0 VERSION=0.7 function usage() { echo "showme v$VERSION" echo "usage: showme OPTIONS" echo " (default) show contents of current dir" echo " -a show all" echo " -A display power management info" echo " -d disk information" echo " -h help" echo " -q quick list" echo " -s summary" } # Defaults OPTION="-" L=l H=h COLOR="--color=auto" while getopts :aAdhqs arg do case $arg in q) unset OPTION L H ;; a) OPTION="-" A=a ;; A) POWER=1 ;; d) SPACE=echo DISK="df -h" ;; h) usage exit 0 ;; s) DU="du -hs" ;; \?) echo "Invalid option -$OPTARG." >&2 usage exit 1 ;; esac done clear pwd ls $OPTION$L$A$H $COLOR $DU $SPACE $DISK | grep -v varrun | grep -v udev | grep -v devshm | grep -v lrm | grep -v varlock | grep -v procbususb if [ "$POWER" == "1" ] then acpi -Vf fi