Date: Wed, 24 Oct 2001 13:28:10 -0700 (PDT) From: David Kirchner <davidk@accretivetg.com> To: <rene@xs4all.nl> Cc: <questions@FreeBSD.ORG> Subject: Re: shell script that takes piped input? Message-ID: <20011024132652.Y85958-100000@localhost> In-Reply-To: <20011024222356.B18891@xs4all.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 24 Oct 2001 rene@xs4all.nl wrote: > Hi, this might be off-topic, but I risk it anyway ;) > > I would like to be pointed to an example of how to program a shell-script > that can do something with a file it gets through a pipe, as such: > somehost%myconfig | myscript.sh > > Thanx in advance for any usefull answers you might share with me.. Check out the 'read' command in sh. Example: #!/bin/sh while read foo do echo $foo done To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011024132652.Y85958-100000>