bash command substitution
Steven Penny
svnpenn@gmail.com
Sun Oct 1 17:01:00 GMT 2017
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
More information about the Cygwin
mailing list