Try the following: echo $(echo hello | cat)
If that remains empty, (it should of course result in 'hello') you're suffering from the same problem I have. And no, I did not get it resolved. In which case I'd be elated if you could get anyone interested in finding a solution! If this happens to you, too, then the problem is that the pipe in a subshell simply does not work. For the vast majority, it DOES work. On 1 October 2017 at 18:01, Steven Penny <svnp...@gmail.com> wrote: > On Sun, 1 Oct 2017 08:40:51, Vukovics Mihaly wrote: > >> VHEIGHT=$(ffprobe -v error -show_entries stream=width,height -of >> default=noprint_wrappers=1 ${OLDFILE} | grep "height" | cut -f2 -d'=') >> >> For debugging purpose the same command is executed without putting the >> result into a variable, and works! Does anyone know why is it not working >> in cygwin? >> > > I am not having this trouble: > > $ VHEIGHT=$(ffprobe -v 0 -of compact=p=0:nk=1 -select_streams 0 \ > -show_entries stream=height 'The Master (2012).mp4') > > $ echo "$VHEIGHT" > 1040 > > but as Marco said, you might need to sanitize for carriage returns: > > $ echo "$VHEIGHT" | od -tcx1 > 0000000 1 0 4 0 \r \n > 31 30 34 30 0d 0a > > > > -- > Problem reports: http://cygwin.com/problems.html > FAQ: http://cygwin.com/faq/ > Documentation: http://cygwin.com/docs.html > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple