Imported from ../bash-2.0.tar.gz.
This commit is contained in:
parent
726f63884d
commit
ccc6cda312
502 changed files with 91988 additions and 69123 deletions
25
examples/scripts.v2/pmtop
Normal file
25
examples/scripts.v2/pmtop
Normal 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
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue