CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 17 Jul 2025 20:44:56 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20080518204627
location: https://web.archive.org/web/20080518204627/https://examples.oreilly.com/upt2/split/rcsegrep.fast
server-timing: captures_list;dur=0.586929, exclusion.robots;dur=0.022218, exclusion.robots.policy;dur=0.010349, esindex;dur=0.011843, cdx.remote;dur=11.769304, LoadShardBlock;dur=198.661357, PetaboxLoader3.datanode;dur=127.539549
x-app-server: wwwb-app219
x-ts: 302
x-tr: 231
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app219; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 17 Jul 2025 20:44:57 GMT
content-type: text/plain
content-length: 2312
x-archive-orig-date: Sun, 18 May 2008 20:46:25 GMT
x-archive-orig-server: Apache
x-archive-orig-last-modified: Mon, 31 Mar 2008 18:10:12 GMT
x-archive-orig-etag: "54c3b9-908-90194900"
x-archive-orig-accept-ranges: bytes
x-archive-orig-content-length: 2312
x-archive-orig-connection: close
cache-control: max-age=1800
x-archive-guessed-content-type: text/plain
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 18 May 2008 20:46:27 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Wed, 22 May 2002 17:13:31 GMT", ; rel="prev memento"; datetime="Tue, 16 Oct 2007 16:17:30 GMT", ; rel="memento"; datetime="Sun, 18 May 2008 20:46:27 GMT", ; rel="next memento"; datetime="Tue, 10 Feb 2009 09:45:04 GMT", ; rel="last memento"; datetime="Fri, 25 Mar 2016 02:58:08 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_3_20080518193113_crawl107-c/52_3_20080518204508_crawl100.arc.gz
server-timing: captures_list;dur=0.767283, exclusion.robots;dur=0.024043, exclusion.robots.policy;dur=0.010759, esindex;dur=0.017624, cdx.remote;dur=17.804736, LoadShardBlock;dur=238.395106, PetaboxLoader3.datanode;dur=120.253440, PetaboxLoader3.resolve;dur=395.323619, load_resource;dur=330.703616
x-app-server: wwwb-app219
x-ts: 200
x-tr: 617
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
accept-ranges: bytes
#! /bin/sh
### rcsegrep.fast - fast version of rcsegrep that reads RCS files directly
### Usage: rcsegrep.fast [-n] pattern [files]
#
# Thanks to Dale Dougherty for the match() idea.
#
# Tabstops in this script set at 4 (in vi, use :se ts=4 sw=4)
# CONFIGURE: If your RCS files use a ",v" or other extension,
# edit the "for" loop below where the comment is
myname=`basename $0`
nopt=0 # DEFAULT -n SETTING (0 = OFF)
if [ ! -d RCS ]; then
echo "$myname quitting: can't find RCS directory." 1>&2
exit 1
fi
case "$#" in
0) echo "Usage: $myname [-n] pattern [files]" 1>&2; exit 1;;
esac
# GRAB OPTION/PATTERN, BE SURE FILENAMES (IF ANY) ARE PATHS TO RCS DIRECTORY:
while :
do
case "$1" in
-n) nopt=1
shift
;;
-*) echo "Usage: $myname [-n] pattern [files]" 1>&2
exit 1
;;
*) pattern="$1"
shift
break # LET for LOOP BELOW HANDLE FILENAMES (IF ANY)
;;
esac
done
for f
do
case "$f" in
*RCS/?*) files="$files $f" ;;
*) files="$files RCS/$f" ;; # Edit if RCS files end in ",v", etc.
esac
done
nawk '
BEGIN {
no=0
yes=1
lastfn="fajskdfjahsfoqarufhfsa" # INITIALIZE
}
{
# JUST STARTED READING NEW FILE:
if (FILENAME != lastfn) {
lastfn=FILENAME
infile=no # READING THE TEXT (NOT RCS CONTROL INFO AT TOP OF FILE)
skipline=no # SKIP THIS LINE IF IT IS OLD REVISION INFO (AFTER TEXT)
textnext=no # IF JUST ABOUT TO READ TEXT, SET TO YES
# MAKE FILENAME WITHOUT "RCS/"
fn=substr(FILENAME,5)
}
# SKIP TO NEXT LINE IF NOT READING THE TEXT:
if (skipline == yes)
next
if (infile == yes) {
if ($0 == "@") {
# END OF TEXT:
skipline=yes
next
}
}
else {
# NOT IN FILE YET. CHECK FOR START OF FILE. IT LOOKS LIKE:
# text
# @
if ($0 == "text") {
textnext=yes
next
}
if (textnext == yes) {
textnext=no # RESET, WHETHER THIS IS REAL START OR NOT:
if ($0 ~ /^@/) {
infile=yes
lineno = 0
sub("^@", "")
# DROP THROUGH TO TEXT CHECK BELOW
}
}
else
next # FALSE ALARM... NOT IN TEXT OF FILE YET
}
# IF WE GET HERE, WE ARE IN THE TEXT OF THE FILE. SEARCH FOR XREFS:
lineno++
# RCS CHANGES ANY @ TO @@. UN-DO THAT:
gsub("@@", "@")
if (match($0, pattern)) {
printf "%s:", fn
if (nopt)
printf("%d:", lineno)
print
}
}' nopt=$nopt pattern="$pattern" myname="$myname" ${files-RCS/*}