[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Probably very stupid script/bash question

On Tue, 04 Mar 2008 18:46:05 +0100
Brian <Brian_dorling@t-online.de> wrote:

> I could not get this to work, the shell complains:
> ./dirvish-mail.sh: 98: Syntax error: redirection unexpected

Interesting to note that this does not work under busybox. I think
this is rather an esoteric but often useful bash feature. (It also
needs /proc so is not available in some special cases.)

> The other solution from Alex:
>  >> echo "$teststring" | ( read A B C D E F; )
> Of course, both solutions work perfectly under bash.

This should not have worked under bash either since it is still running
in a sub-shell, so the variables are lost when read finishes.

Reply to: