On Jan 29, 2008 5:25 PM, Alok G. Singh <[EMAIL PROTECTED]> wrote:

> On 29 Jan 2008, [EMAIL PROTECTED] wrote:
>
> > I am doing it this way now. I read whatever there is on the standard
> input
> > into a variable :
> >
> > read -d "^d"  VAR
>
> You could just read from stdin:
>
> read -d "^d" <&1
>

My read was in the context of reading the piped output from a previous
command in my shell script. Hence if i have

read -d "^d" VAR
echo $VAR

in a file called myscript.sh

then
$ cat AFILE | ./myscript.sh

also achieves the same thing. Although as Gora said, the newlines get
swallowed up.



-- 
Puneet
http://sahyog.blogspot.com/
Latest Post: Tutorial on SVN setup and usage
_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Next Event: http://freed.in - February 22/23, 2008
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to