Thank you. That's a really neat solution - and it would never have
occurred to me. I always think from left to right!
Richard
Paul Jarc wrote:
Richard Neill <[EMAIL PROTECTED]> wrote:
the aim is to parse the output of "ffmpeg -formats" to see whether
certain codecs are supported by that bui
Richard Neill <[EMAIL PROTECTED]> wrote:
> the aim is to parse the output of "ffmpeg -formats" to see whether
> certain codecs are supported by that build.
I'd use something like:
while read line; do
...
done < <(ffmpeg -formats 2>/dev/null)
That puts ffmpeg into a subshell instead of read.
p
Dear Eric,
Thank you for your helpful answer. I'd understood that bash *doesn't*
pass info back from the child to the parent, but I didn't realise that
it was fundamentally *impossible* to do in Unix. I guess that tempfiles
would do it - though that's rather ugly.
Is there any way to use "re
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Richard Neill on 7/22/2008 8:04 PM:
| This prints "Match-1", but does not print "Match-2".
|
| The only way to get data out of the read-subshell is by something like
| "exit 2", and looking at $?
You can also use files. The position wit
On 2008-07-23, Richard Neill wrote:
> At the moment, variables set within a subshell can never be accessed by
> the parent script. This is true, even for an implicit subshell such as
> caused by read.
The subshell is caused by the ipe, not by read.
> For example, consider the following (sli