CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 16 Jul 2025 05:08:03 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090210094459
location: https://web.archive.org/web/20090210094459/https://examples.oreilly.com/upt2/split/pipegrep
server-timing: captures_list;dur=0.540853, exclusion.robots;dur=0.022368, exclusion.robots.policy;dur=0.010910, esindex;dur=0.010549, cdx.remote;dur=6.227998, LoadShardBlock;dur=284.443617, PetaboxLoader3.datanode;dur=102.052505, PetaboxLoader3.resolve;dur=147.619304
x-app-server: wwwb-app204
x-ts: 302
x-tr: 319
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app204; 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, 16 Jul 2025 05:08:04 GMT
content-type: text/plain
content-length: 904
x-archive-orig-date: Tue, 10 Feb 2009 09:44:59 GMT
x-archive-orig-server: Apache
x-archive-orig-last-modified: Mon, 31 Mar 2008 18:10:12 GMT
x-archive-orig-etag: "6b1ecb-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: Tue, 10 Feb 2009 09:44:59 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="Sun, 18 May 2008 20:32:48 GMT", ; rel="memento"; datetime="Tue, 10 Feb 2009 09:44:59 GMT", ; rel="next memento"; datetime="Wed, 30 Sep 2015 17:28:06 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_8_20090210075601_crawl103-c/52_8_20090210094437_crawl100.arc.gz
server-timing: captures_list;dur=0.609956, exclusion.robots;dur=0.021308, exclusion.robots.policy;dur=0.009837, esindex;dur=0.012641, cdx.remote;dur=38.777997, LoadShardBlock;dur=126.500720, PetaboxLoader3.datanode;dur=115.442262, PetaboxLoader3.resolve;dur=150.542840, load_resource;dur=176.072019
x-app-server: wwwb-app204
x-ts: 200
x-tr: 398
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
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 $@;