summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-06-23 00:57:17 +0000
committerobrien <obrien@FreeBSD.org>2002-06-23 00:57:17 +0000
commit5af10eaf9618f0c4d8126219a345dbe2a1bb929c (patch)
tree38eb77fe5a3e65f3c77efcd21afb67f94b14d08c /usr.bin
parent68e7c19af4119b5b78110a279f880e3912420f4d (diff)
downloadFreeBSD-src-5af10eaf9618f0c4d8126219a345dbe2a1bb929c.zip
FreeBSD-src-5af10eaf9618f0c4d8126219a345dbe2a1bb929c.tar.gz
Only got one of the Perl usages.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/locate/locate/mklocatedb.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/locate/locate/mklocatedb.sh b/usr.bin/locate/locate/mklocatedb.sh
index 5bb0e7a..fb743e4 100644
--- a/usr.bin/locate/locate/mklocatedb.sh
+++ b/usr.bin/locate/locate/mklocatedb.sh
@@ -76,14 +76,15 @@ if [ X"$1" = "X-presort" ]; then
$code $bigrams > $filelist || exit 1
locate -d $filelist / | $bigram | $sort -nr | head -128 |
- awk '{if (/^[ ]*[0-9]+[ ]+..$/) {printf("%s",$2)} else {exit 1}}' > $bigrams || exit 1
+ awk '{if (/^[ ]*[0-9]+[ ]+..$/) {printf("%s",$2)} else {exit 1}}' > $bigrams
+ || exit 1
locate -d $filelist / | $code $bigrams || exit 1
exit
else
if $sortcmd $sortopt > $filelist; then
$bigram < $filelist | $sort -nr |
- perl -ne '/^\s*[0-9]+\s(..)$/ && print $1 || exit 1' > $bigrams
+ awk '{if (/^[ ]*[0-9]+[ ]+..$/) {printf("%s",$2)} else {exit 1}}' > $bigrams
|| exit 1
$code $bigrams < $filelist || exit 1
else
OpenPOWER on IntegriCloud