From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17219 invoked from network); 23 Jun 1998 23:57:16 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 23 Jun 1998 23:57:16 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id TAA04238; Tue, 23 Jun 1998 19:52:50 -0400 (EDT) Resent-Date: Tue, 23 Jun 1998 19:49:09 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980623165004.ZM1626@candle.brasslantern.com> Date: Tue, 23 Jun 1998 16:50:03 -0700 In-Reply-To: <19980623184223.11524@astaroth.nit.gwu.edu> Comments: In reply to Sweth Chandramouli "Re: Re: easy way to read from stdin ?" (Jun 23, 6:42pm) References: <19980623163758.05103@astaroth.nit.gwu.edu> <980623150145.ZM1264@candle.brasslantern.com> <19980623184223.11524@astaroth.nit.gwu.edu> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Sweth Chandramouli , ZSH Users Subject: Re: easy way to read from stdin ? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"QSplx3.0.B01.kx3ar"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1651 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.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