bug-bash
[Top][All Lists]
Advanced

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

Re: bash: request for a way to return variables to the parent of a subsh


From: Paul Jarc
Subject: Re: bash: request for a way to return variables to the parent of a subshell
Date: Wed, 23 Jul 2008 00:06:38 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Richard Neill <rn214@hermes.cam.ac.uk> 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.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]