This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cont'd - RE: 1.5.9: Trouble with setting variables using 'read' in a script


(Please excuse the unfinished last mail, I hit "Ctrl-Enter"
by accident.)

>   - echo "text" | read var ; echo $var
>   - cat file | read var ; echo $var
>   - read var < file | echo $var

.. continuing from last time, all of these won't work
because you're always creating a new subshell.

Try

  read var < file ; echo $var

Cheers,
	Jan.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]