CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 06 Aug 2025 04:40:38 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20080518203248
location: https://web.archive.org/web/20080518203248/https://examples.oreilly.com/upt2/split/pipegrep
server-timing: captures_list;dur=0.658406, exclusion.robots;dur=0.027873, exclusion.robots.policy;dur=0.014024, esindex;dur=0.014115, cdx.remote;dur=84.953479, LoadShardBlock;dur=366.970630, PetaboxLoader3.datanode;dur=113.514848, PetaboxLoader3.resolve;dur=60.363188
x-app-server: wwwb-app221
x-ts: 302
x-tr: 483
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=2
set-cookie: wb-p-SERVER=wwwb-app221; 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: Wed, 06 Aug 2025 04:40:39 GMT
content-type: text/plain
content-length: 904
x-archive-orig-date: Sun, 18 May 2008 20:32:46 GMT
x-archive-orig-server: Apache
x-archive-orig-last-modified: Mon, 31 Mar 2008 18:10:12 GMT
x-archive-orig-etag: "54c3e8-388-90194900"
x-archive-orig-accept-ranges: bytes
x-archive-orig-content-length: 904
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:32:48 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 19 Aug 2002 08:57:13 GMT", ; rel="prev memento"; datetime="Tue, 16 Oct 2007 16:17:04 GMT", ; rel="memento"; datetime="Sun, 18 May 2008 20:32:48 GMT", ; rel="next memento"; datetime="Tue, 10 Feb 2009 09:44:59 GMT", ; rel="last memento"; datetime="Sun, 22 Dec 2019 23:05:42 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_20080518203051_crawl100.arc.gz
server-timing: captures_list;dur=0.719888, exclusion.robots;dur=0.025844, exclusion.robots.policy;dur=0.012457, esindex;dur=0.014432, cdx.remote;dur=9.932915, LoadShardBlock;dur=328.146340, PetaboxLoader3.datanode;dur=202.848932, PetaboxLoader3.resolve;dur=254.039565, load_resource;dur=180.511381
x-app-server: wwwb-app221
x-ts: 200
x-tr: 544
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
#!/usr/bin/perl
# Usage: pipegrep [\-l] pattern command [files]
if ($ARGV[0] eq '\-l') {
shift;
$action = <<'EOF';
print $file,"\n";
next file;
EOF
}
else {
$action = <<'EOF';
print $file,":\t", $_;
EOF
}
# Get pattern and protect the delimiter we'll use.
$pat = shift;
$pat =~ s/!/\\!/g;
# Get command and make sure it has a {}.
$cmd = shift;
$cmd .= ' {}' unless $cmd =~ /{}/;
# Modify each filename into the corresponding command.
for (@ARGV) {
$file = $_;
$_ = $cmd;
s/{}/$file/;
s/$/ |/;
}
# Generate the program.
$prog = <) {
if (m!$pat!) {
$action
}
}
}
EOF
print $prog if $debugging;
# And finally, do it.
eval $prog;
die $@ if $@;