michael@0: #!/bin/sh michael@0: michael@0: if [ $# -ne 2 ] michael@0: then michael@0: echo "Usage: `basename $0` " michael@0: exit 1 michael@0: fi michael@0: michael@0: while true michael@0: do michael@0: sample=`adb shell b2g-procrank | grep "^${1}" | awk '{ print $6 }' | sed 's/.$//'` michael@0: echo "$sample" michael@0: echo "$sample" >> "$2" michael@0: sleep 1 michael@0: done michael@0: