From owner-freebsd-questions Tue May 29 21: 3:15 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 7BD9237B423 for ; Tue, 29 May 2001 21:03:11 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 30724 invoked by uid 100); 30 May 2001 04:03:10 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15124.28926.954566.393875@guru.mired.org> Date: Tue, 29 May 2001 23:03:10 -0500 To: "Corey Brune" Cc: questions@freebsd.org, dochawk@psu.edu Subject: Re: reading from batch file with ex In-Reply-To: <18793484@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Corey Brune types: > try: > ex < filename Or try a here document if you really want it in place (and I changed the s to a c to make it easier to read): ex < script or maybe that should be: sed '1c Corey > > Richard E. Hawkins > > > > ------- =_aaaaaaaaaa0 > > Content-Type: text/plain; charset="us-ascii" > > Content-ID: <35984.991166297.1@fac13.ds.psu.edu> > > > > I am writing a script to make needed modifications to a linux > > installation file. > > > > I want to use ex do some of the editing. According to the man page, ex > > will read from standard input, but when I create the file "test" > > > > > > ------- =_aaaaaaaaaa0 > > Content-Type: text/plain; charset="us-ascii" > > Content-ID: <35984.991166297.2@fac13.ds.psu.edu> > > > > ex fixlinux86 > > s/^.*$/#!\/compat\/linux\/bin\/sh/ > > w > > q > > > > and then type "sh test" > > > > ex is loaded, but waits for input from the xterm, rather than from > > remainder of the file. Shouldn't the file be standard input in this > > context? > > > > thanks > > > > hawk > > > > -- > > Prof. Richard E. Hawkins, Esq. /"\ ASCII ribbon campaign > > dochawk@psu.edu Smeal 178 (814) 375-4700 \ / against HTML mail > > These opinions will not be those of X and postings > > Penn State until it pays my retainer. / \ > > > > > > > > ------- =_aaaaaaaaaa0-- > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- Mike Meyer http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message