From: Scott Lurndal on
Phred Phungus <Phred(a)example.invalid> writes:
>John Gordon wrote:
>> In <7vl3guFs3gU1(a)mid.individual.net> Phred Phungus <Phred(a)example.invalid> writes:
>>
>>> fp = popen ("mv *.c backups1/.", "r");
>>
>> Why are you capturing the output of the mv command? popen() does not return
>> error output, only standard output. What standard output are you hoping to
>> capture?
>>
>
>Should be:
>
>(void) fp = popen ("mv *.c backups1/.", "r");

No. That won't even compile. use system(3) instead.
From: Seebs on
On 2010-03-26, Rainer Weikusat <rweikusat(a)mssgmbh.com> wrote:
> That some people inevitably reinvent the Gordian knot whenever given
> enough rope is not something the rope is accountable for.

We were unable to find an alternative in that particular case. We had
a large make variable and wanted to iterate through it, without either:
1. Using one command per item in the list (takes an order of magnitude
too long)
or
2. Trying to pass the whole thing as one item (blows up many shells).

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!