Re: sh -c '{ exec > a; } > b; echo x' > c

2017-08-14 Thread Stephane Chazelas
2017-08-14 10:03:52 +0100, Geoff Clare: [...] > > All shells I tried output to "c" there, which to a user can be > > confusing. Maybe the mechanism should be specified somehow in > > the spec, like a note in the description of the "exec" utility. > > Not sure of the best way to express it though.

Re: sh -c '{ exec > a; } > b; echo x' > c

2017-08-14 Thread Geoff Clare
Stephane Chazelas wrote, on 12 Aug 2017: > > Hello, > > where shall "x\n" be output when one does: > > sh -c '{ exec > a; } > b; echo x' > c > > or: > > sh -c 'eval "exec > a" > b; echo x' > c > > ? > > As "exec" should apply the redirection to the current