From: Ben Gras Date: Mon, 2 Apr 2007 12:09:43 +0000 (+0000) Subject: fix off-by-one error in 'all' X-Git-Tag: v3.1.3~24 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch04.html?a=commitdiff_plain;h=c808aeb74e286ede55304393eace4fcb53c44e98;p=minix.git fix off-by-one error in 'all' --- diff --git a/commands/scripts/packman.sh b/commands/scripts/packman.sh index 29eaaa5c1..393e6a725 100644 --- a/commands/scripts/packman.sh +++ b/commands/scripts/packman.sh @@ -118,7 +118,7 @@ do cd $TMPDIR fi ) | sort -t'|' +1 | awk '{ n++; printf "%d|%s\n", n, $0 }' ) >$TMPF - highest="`wc -l $TMPF | awk '{ print $1 }'`" + highest="`wc -l $TMPF | awk '{ print $1 - 1 }'`" awk -F'|' <$TMPF '{ printf "%3s %-15s %s\n", $1, $2, $3 }' | more echo "Format examples: '3', '3,6', '3-9', '3-9,11-15', 'all'" echo -n "Package(s) to install (RETURN to exit) ? "