Imported from ../bash-2.0.tar.gz.

This commit is contained in:
Jari Aalto
2009-09-12 16:46:49 +00:00
parent 726f63884d
commit ccc6cda312
502 changed files with 91975 additions and 69110 deletions
+25
View File
@@ -0,0 +1,25 @@
#! /bin/bash
#
# pmtop - poor man's `top' for SunOS 4.x
#
CLEAR=clear # could also be 'tput clear'
HEADER="USER PID %CPU %MEM SZ RSS TT STAT START TIME COMMAND"
if [ -n "$LINES" ]; then
SS=$(( $LINES - 2 ))
else
SS=20
fi
while :
do
$CLEAR
echo "$HEADER"
ps -aux | sort -nr +2 | sed ${SS}q
sleep 5
done
exit 0