#!/bin/bash # (c) 2010 proteus, released under the GPL 2.0 VERSION=0.7.1 function usage() { echo "showme v$VERSION" echo "usage: showme OPTIONS" echo " (default) show contents of current dir" echo " -a show all" echo " -d disk information" echo " -h help" echo " -q quick list" echo " -r reverse" echo " -s summary" } # Defaults OPTION="-" L=l H=h COLOR="--color=auto" while getopts :aAdhqrs arg do case $arg in q) unset OPTION L H ;; a) A=a ;; d) SPACE=echo DISK="df -h" ;; h) usage exit 0 ;; r) R="tr" ;; s) DU="du -hs" ;; \?) echo "Invalid option -$OPTARG." >&2 usage exit 1 ;; esac done clear pwd ls $OPTION$L$A$H$R $COLOR $DU $SPACE $DISK | grep -v varrun | grep -v udev | grep -v devshm | grep -v lrm | grep -v varlock | grep -v procbususb \ | grep -v tmpfs | grep -v none