27 lines
764 B
Plaintext
27 lines
764 B
Plaintext
$OpenBSD: patch-bin_pt-mext,v 1.2 2012/07/06 14:42:46 giovanni Exp $
|
|
--- bin/pt-mext.orig Tue Jun 12 18:04:14 2012
|
|
+++ bin/pt-mext Fri Jul 6 16:35:19 2012
|
|
@@ -65,7 +65,7 @@ NUM=0;
|
|
REL=0;
|
|
|
|
# Command-line parsing.
|
|
-args=`getopt -u -n mext r "$@"`;
|
|
+args=`getopt pt-mext "$@"`;
|
|
if [ "$?" = "1" ]; then
|
|
usage;
|
|
fi
|
|
@@ -97,11 +97,11 @@ SPEC="%-33s %13d"
|
|
AWKS=""
|
|
NUM=`ls "$FILE"* | wc -l`;
|
|
# The last file will be empty...
|
|
-NUM=`expr $NUM - 3`;
|
|
+NUM=`expr $NUM - 2`;
|
|
|
|
# Join each file with the next file, joining on the first field. Build a printf
|
|
# spec and awk spec at the same time.
|
|
-for i in `seq 0 $NUM`; do
|
|
+for i in $(expr `jot $NUM` - 1); do
|
|
NEXTFILE=`expr $i + 1`;
|
|
|
|
# Sort each file and eliminate empty lines, so 'join' doesn't complain.
|