CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 16 Jul 2025 00:37:56 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090210085504
location: https://web.archive.org/web/20090210085504/https://examples.oreilly.com/upt2/split/zloop
server-timing: captures_list;dur=0.704316, exclusion.robots;dur=0.024907, exclusion.robots.policy;dur=0.010533, esindex;dur=0.012832, cdx.remote;dur=63.358197, LoadShardBlock;dur=181.464367, PetaboxLoader3.datanode;dur=94.696524, PetaboxLoader3.resolve;dur=69.203228
x-app-server: wwwb-app220
x-ts: 302
x-tr: 270
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app220; 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 00:37:56 GMT
content-type: text/plain
content-length: 929
x-archive-orig-date: Tue, 10 Feb 2009 08:55:04 GMT
x-archive-orig-server: Apache
x-archive-orig-last-modified: Mon, 31 Mar 2008 18:10:12 GMT
x-archive-orig-etag: "43693c-3a1-90194900"
x-archive-orig-accept-ranges: bytes
x-archive-orig-content-length: 929
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 08:55:04 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Wed, 19 Jun 2002 01:53:24 GMT", ; rel="prev memento"; datetime="Tue, 16 Oct 2007 16:22:58 GMT", ; rel="memento"; datetime="Tue, 10 Feb 2009 08:55:04 GMT", ; rel="next memento"; datetime="Wed, 30 Sep 2015 16:47:17 GMT", ; rel="last memento"; datetime="Fri, 25 Mar 2016 02:59:25 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_20090210085419_crawl100.arc.gz
server-timing: captures_list;dur=0.697710, exclusion.robots;dur=0.024809, exclusion.robots.policy;dur=0.010096, esindex;dur=0.015639, cdx.remote;dur=7.683173, LoadShardBlock;dur=178.388257, PetaboxLoader3.datanode;dur=135.744408, PetaboxLoader3.resolve;dur=159.580396, load_resource;dur=157.326749
x-app-server: wwwb-app220
x-ts: 200
x-tr: 372
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
## zloop - loop through compressed/gzipped file(s), running command on each
## Usage: zloop 'command to run' file.(Z|gz) [files.(Z|gz)...]
myname="`basename $0`"
zcat=/usr/local/bin/gzcat # GNU zcat THAT HANDLES BOTH compress AND gzip
case $# in
0|1) echo "Usage: $myname 'command to run' file.Z [files.Z...]" 1>&2
exit 1
;;
esac
# AT LEAST, CATCH PROBLEM WHERE MULTI-WORD COMMAND ISN'T QUOTED:
case "$2" in
*.Z|*.gz) ;;
*) echo "Usage: $myname 'command to run' file.(Z|gz) [files.(Z|gz)...]
('$2' doesn't look like a compressed file.Z or gzipped file.gz)." 1>&2
exit 1
;;
esac
cmd="$1"; shift
for file
do
# DO IN ONE echo BECAUSE echo SUB-PROCESS IS ALREADY WASTE OF TIME:
echo "
==== $myname: zcat $file | $cmd ====" 1>&2
eval $zcat $file \| $cmd
status=$?
case "$status" in
0) ;;
*) echo "$myname: note: that command returned $status (non-zero) status:
'$zcat $file | $cmd'" 1>&2
;;
esac
done