From 9fb7a4f7f7b78476d496cac2b83f9006acd7f483 Mon Sep 17 00:00:00 2001 From: Arvindh Rajesh Tamilmani Date: Wed, 19 May 2010 18:20:10 -0700 Subject: bin/", bin/"": simplify R=rsc CC=codebot http://codereview.appspot.com/953047 --- "bin/\"\"" | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'bin/""') diff --git "a/bin/\"\"" "b/bin/\"\"" index dcd4fe7a..c77da34d 100755 --- "a/bin/\"\"" +++ "b/bin/\"\"" @@ -1,19 +1,10 @@ #!/usr/local/plan9/bin/rc -PROMPT='[^ ]*[%;$#][ ]+' - -" $* | - grep -v '^'$PROMPT'""' | - tail -1 | - tee >{wc -l >/tmp/qq.$pid} | - tee /dev/stderr | - 9 sed 's/^ '$PROMPT'//' | - rc - -if(~ `{cat /tmp/qq.$pid} 0){ - rm /tmp/qq.$pid - echo no such command found +cmd = `{" $* | tail -1} +if (~ $#cmd 0) { + echo no such command found >[1=2] exit notfound } -rm /tmp/qq.$pid -exit 0 + +echo ' ' $cmd >[1=2] +rc -c $"cmd -- cgit v1.2.3