CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 16 Jul 2025 15:21:06 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090210094444
location: https://web.archive.org/web/20090210094444/https://examples.oreilly.com/upt2/split/formprog
server-timing: captures_list;dur=0.530856, exclusion.robots;dur=0.018615, exclusion.robots.policy;dur=0.008747, esindex;dur=0.013949, cdx.remote;dur=10.814125, LoadShardBlock;dur=223.663444, PetaboxLoader3.datanode;dur=202.833721
x-app-server: wwwb-app216
x-ts: 302
x-tr: 255
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app216; 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 15:21:07 GMT
content-type: text/plain
content-length: 1171
x-archive-orig-date: Tue, 10 Feb 2009 09:44:43 GMT
x-archive-orig-server: Apache
x-archive-orig-last-modified: Mon, 31 Mar 2008 18:10:12 GMT
x-archive-orig-etag: "2272b0-493-90194900"
x-archive-orig-accept-ranges: bytes
x-archive-orig-content-length: 1171
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:44 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 18 Jun 2002 23:19:45 GMT", ; rel="prev memento"; datetime="Sun, 18 May 2008 20:31:13 GMT", ; rel="memento"; datetime="Tue, 10 Feb 2009 09:44:44 GMT", ; rel="next memento"; datetime="Wed, 30 Sep 2015 19:16:10 GMT", ; rel="last memento"; datetime="Fri, 25 Mar 2016 03:19:33 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.507100, exclusion.robots;dur=0.018019, exclusion.robots.policy;dur=0.009412, esindex;dur=0.012454, cdx.remote;dur=280.043246, LoadShardBlock;dur=328.071896, PetaboxLoader3.datanode;dur=262.469858, PetaboxLoader3.resolve;dur=156.779086, load_resource;dur=231.616754
x-app-server: wwwb-app216
x-ts: 200
x-tr: 872
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
# formprog - fill in template form from $1, leave completed form in $2
# TABSTOPS ARE SET AT 4 IN THIS SCRIPT
template="$1" completed="$2" errors=/tmp/formprog$$
myname=`basename $0` # BASENAME OF THIS SCRIPT (NO LEADING PATH)
trap 'rm -f $errors; exit' 0 1 2 15
# READ $template LINE-BY-LINE, WRITE COMPLETED LINES TO $completed:
exec 4<&0 # SAVE ORIGINAL stdin (USUALLY TTY) AS FD 4
while read label text
do
case "$label" in
?*:) # FIRST WORD ENDS WITH A COLON; LINE IS OKAY
case "$text" in
?*) # SHOW LINE ON SCREEN AND PUT INTO completed FILE:
echo "$label $text"
echo "$label $text" 1>&3
;;
*) # FILL IT IN OURSELVES:
echo -n "$label "
exec 5<&0 # SAVE template FILE FD; DO NOT CLOSE!
exec 0<&4 # RESTORE ORIGINAL stdin TO READ ans
read ans
exec 0<&5 # RECONNECT template FILE TO stdin
case "$ans" in
"") ;; # EMPTY; DO NOTHING
*) echo "$label $ans" 1>&3 ;;
esac
;;
esac
;;
*) echo "$myname: bad $1 line: '$label $text'" 1>&2; break;;
esac
done <"$template" 2>$errors 3>"$completed"
if [ -s $errors ]; then
/bin/cat $errors 1>&2
echo "$myname: should you remove '$completed' file?" 1>&2
fi