From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Sweth Chandramouli <sweth@astaroth.nit.gwu.edu>,
ZSH Users <zsh-users@math.gatech.edu>
Subject: Re: easy way to read from stdin ?
Date: Tue, 23 Jun 1998 16:50:03 -0700 [thread overview]
Message-ID: <980623165004.ZM1626@candle.brasslantern.com> (raw)
In-Reply-To: <19980623184223.11524@astaroth.nit.gwu.edu>
On Jun 23, 6:42pm, Sweth Chandramouli wrote:
} Subject: Re: Re: easy way to read from stdin ?
}
} > What is it that you are doing to cause it to read from a file? That is,
} > when it's not a cgi, how do you run it?
} i put a "< filename" after the while read loop, so that it would
} read input from the file "filename". basically, i'm trying to create a
} mailto form here--it should take the values from the form in question,
} [...]
} but when i run it as a form, it acts as though it is getting no input.
Is the form using METHOD=post to send data to the server? Otherwise there
isn't any standard input. The enviroment variable CONTENT_LENGTH should
tell how many bytes you can expect to read.
Try doing
local input
read -u0k $CONTENT_LENGTH input
This should stuff the entire stdin (up to $CONTENT_LENGTH bytes) into
the variable "input". The input may be coming to you with "\r\n" line
endings, in which case I'm not sure how a plain "read" behaves.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
prev parent reply other threads:[~1998-06-23 23:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-23 20:37 Sweth Chandramouli
1998-06-23 22:01 ` Bart Schaefer
1998-06-23 22:42 ` Sweth Chandramouli
1998-06-23 23:50 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=980623165004.ZM1626@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=sweth@astaroth.nit.gwu.edu \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).