bin/", bin/"": simplify

R=rsc
CC=codebot
http://codereview.appspot.com/953047
This commit is contained in:
Arvindh Rajesh Tamilmani 2010-05-19 18:20:10 -07:00 committed by Russ Cox
parent 18ee9a80f1
commit 9fb7a4f7f7
2 changed files with 9 additions and 22 deletions

10
bin/"
View file

@ -21,11 +21,7 @@ switch($#*) {
case 0
cmds | tail -1
case *
cmds | grep '^ '^$"* | {echo; cat} |
pr -t -n | sort -nr | sort -u +1 | sort -n |
sed 's/^ *[0-9]+ //' | grep .
cmds | grep -n '^ '^$"* | tail -r |
sort -u +1 | sort -n |
sed 's/^[0-9]+: //'
}
# the silly {echo; cat} gets around pr printing "empty file" when
# presented with no input.