SCCS-vsn: usr.bin/locate/locate/updatedb.csh 5.1
#
# %sccs.include.redist.sh%
#
#
# %sccs.include.redist.sh%
#
-# @(#)updatedb.csh 4.13 (Berkeley) %G%
+# @(#)updatedb.csh 5.1 (Berkeley) %G%
#
set SRCHPATHS = "/" # directories to be put in the database
#
set SRCHPATHS = "/" # directories to be put in the database
# ('awk', with its associative memory capacity, can do this in several
# lines, but is too slow, and runs out of string space on small machines).
# ('awk', with its associative memory capacity, can do this in several
# lines, but is too slow, and runs out of string space on small machines).
-# only search locally
-# find ${SRCHPATHS} ! -fstype local -a -prune -o -print | \
-find ${SRCHPATHS} -print | \
+# search locally or everything
+# find ${SRCHPATHS} -print | \
+find ${SRCHPATHS} ! -fstype local -a -prune -o -print | \
- (sort -f; echo $status > $errs) | tr '\001' '/' > $filelist
+ (sort -T /var/tmp -f; echo $status > $errs) | tr '\001' '/' > $filelist
$LIBDIR/locate.bigram < $filelist | \
$LIBDIR/locate.bigram < $filelist | \
- (sort; echo $status >> $errs) | uniq -c | sort -nr | \
+ (sort -T /var/tmp; echo $status >> $errs) | \
+ uniq -c | sort -T /var/tmp -nr | \
awk '{ if (NR <= 128) print $2 }' | tr -d '\012' > $bigrams
# code the file list
awk '{ if (NR <= 128) print $2 }' | tr -d '\012' > $bigrams
# code the file list