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
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.
For example, consider the following (slightly contrived example)
touch example-file
ls -l | while read LINE ; do
i
Dear All,
Might I propose bash should add another operator, >>> for "redirection
into a variable". This would be by analogy with the <<< operator.
For example, we can currently use <<< to save an "echo", by doing this:
TEXT="Hello World"
grep -o 'hello' <<<"$TEXT"
instead of
TE
Hello,
#: subst.c:4367
#, c-format
msgid "cannout reset nodelay mode for fd %d"
There's a typo: "cannout" -> "can not"
Best regards,
--
Gintautas Miliauskas
On Tuesday 22 July 2008 13:38, Lawrence D'Oliveiro wrote:
> And even with the specialness of bang turned off, it still doesn't work
> right:
>
> [EMAIL PROTECTED]:~> set +H
> [EMAIL PROTECTED]:~> echo "hi there!"
> hi there!
> [EMAIL PROTECTED]:~> echo "hi there\!"
> hi there\!
> [EMAIL PROTECTED
Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes:
> And even with the specialness of bang turned off, it still doesn't work
> right:
>
> [EMAIL PROTECTED]:~> set +H
> [EMAIL PROTECTED]:~> echo "hi there!"
> hi there!
> [EMAIL PROTECTED]:~> echo "hi there\!"
> hi there\!
> [EMAIL PROTECTED]:~> echo h
Chet Ramey wrote:
> Bash and csh both permit backslash to inhibit history expansion when in
> double quotes.
If a printable character has special meaning in syntax for representing data
strings, then in any situation where it's special, it is expected to be
possible to disable that specialness by
11 matches
Mail list logo