Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #23892 > unrolled thread
| Started by | Chicken McNuggets <chicken@mcnuggets.com> |
|---|---|
| First post | 2012-07-29 16:11 +0100 |
| Last post | 2012-08-16 09:43 +0100 |
| Articles | 20 on this page of 100 — 31 participants |
Back to article view | Back to comp.lang.c
Wrapping existing UNIX commands in C Chicken McNuggets <chicken@mcnuggets.com> - 2012-07-29 16:11 +0100
Re: Wrapping existing UNIX commands in C Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-07-29 11:18 -0400
Re: Wrapping existing UNIX commands in C Chicken McNuggets <chicken@mcnuggets.com> - 2012-07-29 16:24 +0100
Re: Wrapping existing UNIX commands in C "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> - 2012-07-29 08:34 -0700
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-07-29 12:05 -0700
Re: Wrapping existing UNIX commands in C "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> - 2012-07-29 14:00 -0700
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-07-29 15:19 -0700
Re: Wrapping existing UNIX commands in C Rui Maciel <rui.maciel@gmail.com> - 2012-07-30 00:35 +0100
Re: Wrapping existing UNIX commands in C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-07-30 14:54 +0000
Re: Wrapping existing UNIX commands in C Chicken McNuggets <chicken@mcnuggets.com> - 2012-07-30 17:15 +0100
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-07-30 12:44 -0400
Re: Wrapping existing UNIX commands in C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-08-02 13:51 +0000
Re: Wrapping existing UNIX commands in C jacob navia <jacob@spamsink.net> - 2012-07-30 11:13 +0200
Re: Wrapping existing UNIX commands in C Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-07-30 01:59 -0700
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-07-29 17:10 +0000
Re: Wrapping existing UNIX commands in C tom st denis <tom@iahu.ca> - 2012-07-31 14:55 -0700
Re: Wrapping existing UNIX commands in C jacob navia <jacob@spamsink.net> - 2012-08-01 00:24 +0200
Re: Wrapping existing UNIX commands in C tom st denis <tom@iahu.ca> - 2012-08-02 06:12 -0700
Re: Wrapping existing UNIX commands in C "Heinrich Wolf" <invalid@invalid.invalid> - 2012-07-29 17:20 +0200
Re: Wrapping existing UNIX commands in C Chicken McNuggets <chicken@mcnuggets.com> - 2012-07-29 16:24 +0100
Re: Wrapping existing UNIX commands in C Ike Naar <ike@sverige.freeshell.org> - 2012-07-29 21:41 +0000
Re: Wrapping existing UNIX commands in C "Heinrich Wolf" <invalid@invalid.invalid> - 2012-07-30 06:46 +0200
Re: Wrapping existing UNIX commands in C "Heinrich Wolf" <invalid@invalid.invalid> - 2012-07-30 06:49 +0200
Re: Wrapping existing UNIX commands in C "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> - 2012-07-29 08:31 -0700
Re: Wrapping existing UNIX commands in C Ike Naar <ike@sverige.freeshell.org> - 2012-07-29 21:46 +0000
Re: Wrapping existing UNIX commands in C Stephen Sprunk <stephen@sprunk.org> - 2012-07-29 11:57 -0500
Re: Wrapping existing UNIX commands in C Nobody <nobody@nowhere.com> - 2012-07-30 12:13 +0100
Re: Wrapping existing UNIX commands in C jacob navia <jacob@spamsink.net> - 2012-07-30 13:26 +0200
Re: Wrapping existing UNIX commands in C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-07-30 12:39 +0100
Re: Wrapping existing UNIX commands in C Mark Bluemel <mark_bluemel@pobox.com> - 2012-07-30 13:16 +0100
Re: Wrapping existing UNIX commands in C BGB <cr88192@hotmail.com> - 2012-07-30 12:39 -0500
Re: Wrapping existing UNIX commands in C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-07-30 15:02 +0000
Re: Wrapping existing UNIX commands in C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-07-30 15:18 +0000
Re: Wrapping existing UNIX commands in C Nobody <nobody@nowhere.com> - 2012-07-31 14:53 +0100
Re: Wrapping existing UNIX commands in C tom st denis <tom@iahu.ca> - 2012-08-02 06:21 -0700
Re: Wrapping existing UNIX commands in C Chicken McNuggets <chicken@mcnuggets.com> - 2012-07-30 18:10 +0100
Re: Wrapping existing UNIX commands in C Paul <nospam@needed.com> - 2012-07-30 13:30 -0400
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-07-30 13:34 -0400
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-08-15 21:21 +0000
Re: Wrapping existing UNIX commands in C Stephen Sprunk <stephen@sprunk.org> - 2012-08-15 17:17 -0500
Re: Wrapping existing UNIX commands in C Stephen Sprunk <stephen@sprunk.org> - 2012-07-30 13:18 -0500
Re: Wrapping existing UNIX commands in C Cal Dershowitz <cal@example.invalid> - 2012-08-01 21:08 -0600
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-08-02 12:20 +0000
Re: Wrapping existing UNIX commands in C tom st denis <tom@iahu.ca> - 2012-08-02 06:15 -0700
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-08-02 14:16 +0000
Re: Wrapping existing UNIX commands in C Kenneth Brody <kenbrody@spamcop.net> - 2012-08-02 11:33 -0400
Re: Wrapping existing UNIX commands in C tom st denis <tom@iahu.ca> - 2012-08-02 11:51 -0700
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-02 15:03 -0700
Re: Wrapping existing UNIX commands in C tom st denis <tom@iahu.ca> - 2012-08-02 18:46 -0700
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-08-03 02:18 +0000
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-02 21:07 -0700
Re: Wrapping existing UNIX commands in C Chicken McNuggets <chicken@mcnuggets.com> - 2012-08-04 10:40 +0100
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-04 03:22 -0700
Re: Wrapping existing UNIX commands in C "Heinrich Wolf" <invalid@invalid.invalid> - 2012-08-04 12:34 +0200
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-08-04 13:25 +0000
Re: Wrapping existing UNIX commands in C Kenneth Brody <kenbrody@spamcop.net> - 2012-08-15 13:52 -0400
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-04 16:26 -0700
Re: Wrapping existing UNIX commands in C Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-08-05 03:27 -0700
Re: Wrapping existing UNIX commands in C gwowen <gwowen@gmail.com> - 2012-08-06 01:50 -0700
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-08-06 07:15 -0400
Re: Wrapping existing UNIX commands in C gwowen <gwowen@gmail.com> - 2012-08-06 04:25 -0700
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-08-06 09:14 -0400
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-08-06 14:14 +0000
Re: Wrapping existing UNIX commands in C gwowen <gwowen@gmail.com> - 2012-08-06 07:43 -0700
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-08-06 11:52 -0400
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-06 11:37 -0700
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-06 11:34 -0700
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-06 11:53 -0700
Re: Wrapping existing UNIX commands in C gwowen <gwowen@gmail.com> - 2012-08-07 00:33 -0700
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-08-07 06:44 -0400
Re: Wrapping existing UNIX commands in C gwowen <gwowen@gmail.com> - 2012-08-07 05:15 -0700
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-08-07 08:37 -0400
Re: Wrapping existing UNIX commands in C Neil Cerutti <neilc@norwich.edu> - 2012-08-07 13:04 +0000
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-07 12:57 -0700
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-08-07 21:24 +0000
Re: Wrapping existing UNIX commands in C Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-08-08 00:58 -0700
Re: Wrapping existing UNIX commands in C "BartC" <bc@freeuk.com> - 2012-08-06 18:04 +0100
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-08-06 18:24 +0000
Re: Wrapping existing UNIX commands in C jgk@panix.com (Joe keane) - 2012-08-22 17:08 +0000
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-08-06 14:46 -0400
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-06 11:55 -0700
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-08-06 19:13 -0400
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-08-06 11:50 -0700
Re: Wrapping existing UNIX commands in C "BartC" <bc@freeuk.com> - 2012-08-06 20:28 +0100
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-08-06 15:44 -0400
Re: Wrapping existing UNIX commands in C Robert Miles <milesrf@Usenet-News.net> - 2012-09-09 22:46 -0500
Re: Wrapping existing UNIX commands in C Kaz Kylheku <kaz@kylheku.com> - 2012-09-10 04:29 +0000
Re: Wrapping existing UNIX commands in C Keith Thompson <kst-u@mib.org> - 2012-09-09 22:42 -0700
Re: Wrapping existing UNIX commands in C Kaz Kylheku <kaz@kylheku.com> - 2012-09-10 19:15 +0000
Re: Wrapping existing UNIX commands in C pete <pfiland@mindspring.com> - 2012-09-10 22:25 -0400
Re: Wrapping existing UNIX commands in C Öö Tiib <ootiib@hot.ee> - 2012-09-10 03:10 -0700
Re: Wrapping existing UNIX commands in C James Kuyper <jameskuyper@verizon.net> - 2012-09-10 08:01 -0400
Re: Wrapping existing UNIX commands in C "io_x" <a@b.c.invalid> - 2012-08-07 10:22 +0200
Re: Wrapping existing UNIX commands in C "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> - 2012-08-07 01:55 -0700
Re: Wrapping existing UNIX commands in C gazelle@shell.xmission.com (Kenny McCormack) - 2012-08-07 21:26 +0000
Re: Wrapping existing UNIX commands in C Rui Maciel <rui.maciel@gmail.com> - 2012-08-08 08:47 +0100
Re: Wrapping existing UNIX commands in C "Ansel" <tinker454@trytospammenowloser.com> - 2012-08-10 21:58 -0600
Re: Wrapping existing UNIX commands in C Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-08-07 00:07 -0700
Re: Wrapping existing UNIX commands in C Kenneth Brody <kenbrody@spamcop.net> - 2012-08-02 11:27 -0400
Re: Wrapping existing UNIX commands in C Rui Maciel <rui.maciel@gmail.com> - 2012-08-16 09:43 +0100
Page 1 of 5 [1] 2 3 4 5 Next page →
| From | Chicken McNuggets <chicken@mcnuggets.com> |
|---|---|
| Date | 2012-07-29 16:11 +0100 |
| Subject | Wrapping existing UNIX commands in C |
| Message-ID | <jv3jqk$r1t$1@speranza.aioe.org> |
Hi, So I am aware of the exec family of functions and the system function to execute external commands but they do not seem to offer the functionality to allow me to get the output of said executable so I can use it in the rest of my program. For instance a simple example would be to use the "ls" command. I would want to get the output of the directory listing and be able to manipulate it later on in my program. Is there an easy way to do this? I realise that this is technically not standard C and is most likely a POSIX extension but it would be nice if someone could offer some advice. Thanks.
[toc] | [next] | [standalone]
| From | Eric Sosman <esosman@ieee-dot-org.invalid> |
|---|---|
| Date | 2012-07-29 11:18 -0400 |
| Message-ID | <jv3k82$92v$1@dont-email.me> |
| In reply to | #23892 |
On 7/29/2012 11:11 AM, Chicken McNuggets wrote:
> Hi,
>
> So I am aware of the exec family of functions and the system function to
> execute external commands but they do not seem to offer the
> functionality to allow me to get the output of said executable so I can
> use it in the rest of my program. For instance a simple example would be
> to use the "ls" command. I would want to get the output of the directory
> listing and be able to manipulate it later on in my program.
>
> Is there an easy way to do this? I realise that this is technically not
> standard C and is most likely a POSIX extension but it would be nice if
> someone could offer some advice.
"Technically not Standard C" is an understatement: There is no
aspect of your question that has anything at all to do with C.[*]
[*] No, not even the passing mention of system() qualifies this
as a C question. On some platforms it is possible to use system()
to run a program and have the output go to a file the invoking
program can then open and read, but the form of the argument that
gets system() to do this is entirely platform-specific.
Try comp.unix.programmer.
--
Eric Sosman
esosman@ieee-dot-org.invalid
[toc] | [prev] | [next] | [standalone]
| From | Chicken McNuggets <chicken@mcnuggets.com> |
|---|---|
| Date | 2012-07-29 16:24 +0100 |
| Message-ID | <jv3kk0$s2v$2@speranza.aioe.org> |
| In reply to | #23893 |
On 29/07/2012 16:18, Eric Sosman wrote: > > "Technically not Standard C" is an understatement: There is no > aspect of your question that has anything at all to do with C.[*] > > [*] No, not even the passing mention of system() qualifies this > as a C question. On some platforms it is possible to use system() > to run a program and have the output go to a file the invoking > program can then open and read, but the form of the argument that > gets system() to do this is entirely platform-specific. > > Try comp.unix.programmer. > Apologies for being so off-topic.
[toc] | [prev] | [next] | [standalone]
| From | "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> |
|---|---|
| Date | 2012-07-29 08:34 -0700 |
| Message-ID | <chine.bleu-83BB75.08342529072012@news.eternal-september.org> |
| In reply to | #23893 |
In article <jv3k82$92v$1@dont-email.me>, Eric Sosman <esosman@ieee-dot-org.invalid> wrote: > On 7/29/2012 11:11 AM, Chicken McNuggets wrote: > > Hi, > > > > So I am aware of the exec family of functions and the system function to > > execute external commands but they do not seem to offer the > > functionality to allow me to get the output of said executable so I can > > use it in the rest of my program. For instance a simple example would be > > to use the "ls" command. I would want to get the output of the directory > > listing and be able to manipulate it later on in my program. > > > > Is there an easy way to do this? I realise that this is technically not > > standard C and is most likely a POSIX extension but it would be nice if > > someone could offer some advice. > > "Technically not Standard C" is an understatement: There is no > aspect of your question that has anything at all to do with C.[*] That's odd, because we have been doing this in C since the 1970s. -- My name Indigo Montoya. | Die, Robbie Ferrier! Die! You flamed my father. | I'm whoever you want me to be. Prepare to be spanked. | Annoying Usenet one post at a time. Stop posting that! | At least I can stay in character.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2012-07-29 12:05 -0700 |
| Message-ID | <ln8ve24cce.fsf@nuthaus.mib.org> |
| In reply to | #23898 |
"China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> writes:
> In article <jv3k82$92v$1@dont-email.me>,
> Eric Sosman <esosman@ieee-dot-org.invalid> wrote:
>> On 7/29/2012 11:11 AM, Chicken McNuggets wrote:
>> > So I am aware of the exec family of functions and the system function to
>> > execute external commands but they do not seem to offer the
>> > functionality to allow me to get the output of said executable so I can
>> > use it in the rest of my program. For instance a simple example would be
>> > to use the "ls" command. I would want to get the output of the directory
>> > listing and be able to manipulate it later on in my program.
>> >
>> > Is there an easy way to do this? I realise that this is technically not
>> > standard C and is most likely a POSIX extension but it would be nice if
>> > someone could offer some advice.
>>
>> "Technically not Standard C" is an understatement: There is no
>> aspect of your question that has anything at all to do with C.[*]
>
> That's odd, because we have been doing this in C since the 1970s.
But you haven't been doing it in *standard* C. (Well, prior to 1989
there was no standard.)
Of course there's nothing wrong with writing non-standard C; the
ability to write system-specific code is one of the language's
greatest strengths. And yes, POSIX is also a standard. But as
you probably know, the people who know about it tend to hang out
in comp.unix.programmer, not in comp.lang.c
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> |
|---|---|
| Date | 2012-07-29 14:00 -0700 |
| Message-ID | <chine.bleu-4AAFCB.14002329072012@news.eternal-september.org> |
| In reply to | #23904 |
In article <ln8ve24cce.fsf@nuthaus.mib.org>, Keith Thompson <kst-u@mib.org> wrote: > "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> writes: > > In article <jv3k82$92v$1@dont-email.me>, > > Eric Sosman <esosman@ieee-dot-org.invalid> wrote: > >> On 7/29/2012 11:11 AM, Chicken McNuggets wrote: > >> > So I am aware of the exec family of functions and the system function to > >> > execute external commands but they do not seem to offer the > >> > functionality to allow me to get the output of said executable so I can > >> > use it in the rest of my program. For instance a simple example would be > >> > to use the "ls" command. I would want to get the output of the directory > >> > listing and be able to manipulate it later on in my program. > >> > > >> > Is there an easy way to do this? I realise that this is technically not > >> > standard C and is most likely a POSIX extension but it would be nice if > >> > someone could offer some advice. > >> > >> "Technically not Standard C" is an understatement: There is no > >> aspect of your question that has anything at all to do with C.[*] > > > > That's odd, because we have been doing this in C since the 1970s. > > But you haven't been doing it in *standard* C. (Well, prior to 1989 > there was no standard.) > > Of course there's nothing wrong with writing non-standard C; the > ability to write system-specific code is one of the language's > greatest strengths. And yes, POSIX is also a standard. But as > you probably know, the people who know about it tend to hang out > in comp.unix.programmer, not in comp.lang.c Did you know comp.lang.c predates 1989? And that we weren't obnoxious twits back then? Are you happy you're wasting more electrons being a dick than where spent just giving a straightfotward and useful answer? Do you know that you are allowed to create a moderated newsgroup that is actually moderated instead of flouncing around on an unmoderated newsgroup? -- My name Indigo Montoya. | Die, Robbie Ferrier! Die! You flamed my father. | I'm whoever you want me to be. Prepare to be spanked. | Annoying Usenet one post at a time. Stop posting that! | At least I can stay in character.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2012-07-29 15:19 -0700 |
| Message-ID | <ln4noq43d7.fsf@nuthaus.mib.org> |
| In reply to | #23907 |
"China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> writes:
> In article <ln8ve24cce.fsf@nuthaus.mib.org>, Keith Thompson <kst-u@mib.org>
> wrote:
>> "China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> writes:
[...]
>> > That's odd, because we have been doing this in C since the 1970s.
>>
>> But you haven't been doing it in *standard* C. (Well, prior to 1989
>> there was no standard.)
>>
>> Of course there's nothing wrong with writing non-standard C; the
>> ability to write system-specific code is one of the language's
>> greatest strengths. And yes, POSIX is also a standard. But as
>> you probably know, the people who know about it tend to hang out
>> in comp.unix.programmer, not in comp.lang.c
>
> Did you know comp.lang.c predates 1989?
Yes, I did. Did you know that it also postdates 1989?
> And that we weren't obnoxious
> twits back then? Are you happy you're wasting more electrons being a
> dick than where spent just giving a straightfotward and useful answer?
> Do you know that you are allowed to create a moderated newsgroup that
> is actually moderated instead of flouncing around on an unmoderated
> newsgroup?
If you have a question about POSIX, which is the best place to ask it
("best" meaning most likely to get good answer), comp.lang.c or
comp.unix.programmer?
And kindly explain how my offering advice and expression my opinion
about which questions are best posted where makes me an "obnoxious
twit".
How many electrons are you wasting by publicly insulting me?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2012-07-30 00:35 +0100 |
| Message-ID | <jv4hbl$np$1@speranza.aioe.org> |
| In reply to | #23907 |
China Blue [Tor], Meersburg wrote: > Did you know comp.lang.c predates 1989? And that we weren't obnoxious > twits back then? Well, it appears that you are now contributing for that turn of events. > Are you happy you're wasting more electrons being a dick > than where spent just giving a straightfotward and useful answer? If you took the time to actually read what has been repeatedly pointed out to you, you would notice that the replies you've got were actually straight forwrad and useful. It's pretty obvious that you would be better served if you posted questions regarding unix APIs to a newsgroup dedicated to unix programming. Yet, instead of following that advice you decided to ignore it and instead waste "more electrons being a dick", as you've put it. Go figure. Rui Maciel
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2012-07-30 14:54 +0000 |
| Message-ID | <slrnk1d81a.ph6.grahn+nntp@frailea.sa.invalid> |
| In reply to | #23913 |
On Sun, 2012-07-29, Rui Maciel wrote: > China Blue [Tor], Meersburg wrote: > >> Did you know comp.lang.c predates 1989? And that we weren't obnoxious >> twits back then? > > Well, it appears that you are now contributing for that turn of events. > >> Are you happy you're wasting more electrons being a dick >> than where spent just giving a straightfotward and useful answer? > > If you took the time to actually read what has been repeatedly pointed out > to you, you would notice that the replies you've got were actually straight > forwrad and useful. As far as I can tell, it wasn't "China Blue" who asked; that guy learned about popen() (and comp.unix.programmer, I hope), thanked and left. I do think the first "this is offtopic, try c.u.p." post could have been formulated better. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | Chicken McNuggets <chicken@mcnuggets.com> |
|---|---|
| Date | 2012-07-30 17:15 +0100 |
| Message-ID | <jv6buj$46r$1@speranza.aioe.org> |
| In reply to | #23957 |
On 30/07/2012 15:54, Jorgen Grahn wrote: > As far as I can tell, it wasn't "China Blue" who asked; that guy > learned about popen() (and comp.unix.programmer, I hope), thanked > and left. > > I do think the first "this is offtopic, try c.u.p." post could have > been formulated better. > > /Jorgen > That is correct. I asked the question. I didn't mean this thread to turn into a flame fest though so apologies for asking a question that was off-topic to this list. Frankly though I think people could just relax a little. It is not the end of the world if someone asks a question that is off-topic. A simple "You'll get a better answer on comp.unix.programmer" would have been sufficient.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2012-07-30 12:44 -0400 |
| Message-ID | <5016B9DC.3090306@verizon.net> |
| In reply to | #23957 |
On 07/30/2012 10:54 AM, Jorgen Grahn wrote: > On Sun, 2012-07-29, Rui Maciel wrote: >> China Blue [Tor], Meersburg wrote: ... >>> Are you happy you're wasting more electrons being a dick >>> than where spent just giving a straightfotward and useful answer? >> >> If you took the time to actually read what has been repeatedly pointed out >> to you, you would notice that the replies you've got were actually straight >> forwrad and useful. ... > I do think the first "this is offtopic, try c.u.p." post could have > been formulated better. How? It had two main parts. The first part pointed out to the OP the clues that he should have used to realize that some other forum would be a more appropriate one for his question. The second part identified c.u.p as that more appropriate forum. Would you have left out the first part? It seems to me that it's important for people to understand how easy it is to determine that c.u.p is a more appropriate forum than this one for questions like this one.
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2012-08-02 13:51 +0000 |
| Message-ID | <slrnk1l1e4.ph6.grahn+nntp@frailea.sa.invalid> |
| In reply to | #23966 |
On Mon, 2012-07-30, James Kuyper wrote: > On 07/30/2012 10:54 AM, Jorgen Grahn wrote: >> On Sun, 2012-07-29, Rui Maciel wrote: >>> China Blue [Tor], Meersburg wrote: > ... >>>> Are you happy you're wasting more electrons being a dick >>>> than where spent just giving a straightfotward and useful answer? >>> >>> If you took the time to actually read what has been repeatedly pointed out >>> to you, you would notice that the replies you've got were actually straight >>> forwrad and useful. > ... >> I do think the first "this is offtopic, try c.u.p." post could have >> been formulated better. > > How? > > It had two main parts. The first part pointed out to the OP the clues > that he should have used to realize that some other forum would be a > more appropriate one for his question. The second part identified c.u.p > as that more appropriate forum. Would you have left out the first part? > It seems to me that it's important for people to understand how easy it > is to determine that c.u.p is a more appropriate forum than this one for > questions like this one. We're talking about Message-ID: <jv3k82$92v$1@dont-email.me> You're right. The first part /did/ come across as rather aggressive when I read it ... but it wasn't insulting, and that's better than the average Usenet posting. I think the tone of the postings that followed influenced my view of the first one. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | jacob navia <jacob@spamsink.net> |
|---|---|
| Date | 2012-07-30 11:13 +0200 |
| Message-ID | <jv5j7s$3nl$1@speranza.aioe.org> |
| In reply to | #23907 |
Le 29/07/12 23:00, China Blue [Tor], Meersburg a écrit : > In article <ln8ve24cce.fsf@nuthaus.mib.org>, Keith Thompson <kst-u@mib.org> > wrote: > > Did you know comp.lang.c predates 1989? And that we weren't obnoxious twits back > then? Of course! We were 22 years younger! Some people tend to change for the worst when they get old... They forget what youth means, even. > Are you happy you're wasting more electrons being a dick than where spent > just giving a straightfotward and useful answer? Do you know that you are > allowed to create a moderated newsgroup that is actually moderated instead of > flouncing around on an unmoderated newsgroup? > Nobody has appointed Mr Thompson as a moderator of this group but he is playing the moderator since such a long time that somehow people (including me) got used to that situation. Happily he tells everywhere that I am in his killfile so that now he can't answer my postings, so I can say and do whatever I want. :-) You should try the same solution: just get into his killfile and then you will live happily thereafter.
[toc] | [prev] | [next] | [standalone]
| From | Nick Keighley <nick_keighley_nospam@hotmail.com> |
|---|---|
| Date | 2012-07-30 01:59 -0700 |
| Message-ID | <1aca14c7-15db-4ee6-ba6e-b65a7c35141a@j9g2000vbk.googlegroups.com> |
| In reply to | #23907 |
On Jul 29, 10:00 pm, "China Blue [Tor], Meersburg" <chine.b...@yahoo.com> wrote: > In article <ln8ve24cce....@nuthaus.mib.org>, Keith Thompson <ks...@mib.org> > > "China Blue [Tor], Meersburg" <chine.b...@yahoo.com> writes: > > > In article <jv3k82$92...@dont-email.me>, > > > Eric Sosman <esos...@ieee-dot-org.invalid> wrote: > > >> On 7/29/2012 11:11 AM, Chicken McNuggets wrote: > > >> > So I am aware of the exec family of functions and the system function to > > >> > execute external commands but they do not seem to offer the > > >> > functionality to allow me to get the output of said executable so I can > > >> > use it in the rest of my program. For instance a simple example would be > > >> > to use the "ls" command. I would want to get the output of the directory > > >> > listing and be able to manipulate it later on in my program. > > > >> > Is there an easy way to do this? I realise that this is technically not > > >> > standard C and is most likely a POSIX extension but it would be nice if > > >> > someone could offer some advice. > > > >> "Technically not Standard C" is an understatement: There is no > > >> aspect of your question that has anything at all to do with C.[*] > > > > That's odd, because we have been doing this in C since the 1970s. how would I do this on a Windows system? > > But you haven't been doing it in *standard* C. (Well, prior to 1989 > > there was no standard.) > > > Of course there's nothing wrong with writing non-standard C; the > > ability to write system-specific code is one of the language's > > greatest strengths. And yes, POSIX is also a standard. But as > > you probably know, the people who know about it tend to hang out > > in comp.unix.programmer, not in comp.lang.c > > Did you know comp.lang.c predates 1989? And that we weren't obnoxious twits back > then? Are you happy you're wasting more electrons being a dick than where spent > just giving a straightfotward and useful answer? where was your "straightfotward and useful answer"? > Do you know that you are > allowed to create a moderated newsgroup that is actually moderated instead of > flouncing around on an unmoderated newsgroup?
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2012-07-29 17:10 +0000 |
| Message-ID | <jv3qpc$s9l$2@news.xmission.com> |
| In reply to | #23893 |
In article <jv3k82$92v$1@dont-email.me>, Eric Sosman <esosman@ieee-dot-org.invalid> wrote: >On 7/29/2012 11:11 AM, Chicken McNuggets wrote: >> Hi, >> >> So I am aware of the exec family of functions and the system function to >> execute external commands but they do not seem to offer the >> functionality to allow me to get the output of said executable so I can >> use it in the rest of my program. For instance a simple example would be >> to use the "ls" command. I would want to get the output of the directory >> listing and be able to manipulate it later on in my program. >> >> Is there an easy way to do this? I realise that this is technically not >> standard C and is most likely a POSIX extension but it would be nice if >> someone could offer some advice. > > "Technically not Standard C" is an understatement: There is no >aspect of your question that has anything at all to do with C.[*] blah, blah, blah, like a biddy old aunt - who hasn't gotten any since the war (WWII, that is). Isn't it funny how, in the rest of the Usenet (and online forums in general), the ethic is "If you can't answer the question, then STFU!", but here in comp.lang.c, people still get mileage out of: Off topic. Not portable. Cant discuss it here. Blah, blah, blah. -- Windows 95 n. (Win-doze): A 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition. Modern day upgrade --> Windows XP Professional x64: Windows is now a 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition.
[toc] | [prev] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-07-31 14:55 -0700 |
| Message-ID | <f9989169-d586-4b32-b67d-fc8204d10a89@fj14g2000vbb.googlegroups.com> |
| In reply to | #23900 |
On Jul 29, 1:10 pm, gaze...@shell.xmission.com (Kenny McCormack) wrote: > In article <jv3k82$92...@dont-email.me>, > Eric Sosman <esos...@ieee-dot-org.invalid> wrote: > > > > > > > > > > >On 7/29/2012 11:11 AM, Chicken McNuggets wrote: > >> Hi, > > >> So I am aware of the exec family of functions and the system function to > >> execute external commands but they do not seem to offer the > >> functionality to allow me to get the output of said executable so I can > >> use it in the rest of my program. For instance a simple example would be > >> to use the "ls" command. I would want to get the output of the directory > >> listing and be able to manipulate it later on in my program. > > >> Is there an easy way to do this? I realise that this is technically not > >> standard C and is most likely a POSIX extension but it would be nice if > >> someone could offer some advice. > > > "Technically not Standard C" is an understatement: There is no > >aspect of your question that has anything at all to do with C.[*] > > blah, blah, blah, like a biddy old aunt - who hasn't gotten any since the > war (WWII, that is). > > Isn't it funny how, in the rest of the Usenet (and online forums in > general), the ethic is "If you can't answer the question, then STFU!", but > here in comp.lang.c, people still get mileage out of: > > Off topic. Not portable. Cant discuss it here. Blah, blah, blah. I like that you post. In case of a lull of NNTP activity you're useful to check if I still have net access... :-)
[toc] | [prev] | [next] | [standalone]
| From | jacob navia <jacob@spamsink.net> |
|---|---|
| Date | 2012-08-01 00:24 +0200 |
| Message-ID | <jv9lv7$5ld$1@speranza.aioe.org> |
| In reply to | #24034 |
Le 31/07/12 23:55, tom st denis a écrit : > On Jul 29, 1:10 pm, gaze...@shell.xmission.com (Kenny McCormack) > wrote: >> >> Off topic. Not portable. Cant discuss it here. Blah, blah, blah. > > I like that you post. In case of a lull of NNTP activity you're > useful to check if I still have net access... > At least his posts are useful, contrary to yours!
[toc] | [prev] | [next] | [standalone]
| From | tom st denis <tom@iahu.ca> |
|---|---|
| Date | 2012-08-02 06:12 -0700 |
| Message-ID | <283492b1-3994-4bda-897d-19172a5f0800@n13g2000vby.googlegroups.com> |
| In reply to | #24036 |
On Jul 31, 6:24 pm, jacob navia <ja...@spamsink.net> wrote: > Le 31/07/12 23:55, tom st denis a crit : > > > On Jul 29, 1:10 pm, gaze...@shell.xmission.com (Kenny McCormack) > > wrote: > > >> Off topic. Not portable. Cant discuss it here. Blah, blah, blah. > > > I like that you post. In case of a lull of NNTP activity you're > > useful to check if I still have net access... > > At least his posts are useful, contrary to yours! Given that you've hijacked CLC to talk about your super-duper collections library [which has nothing to do with clc] I'll take that for what it's worth. Nothing. Tom
[toc] | [prev] | [next] | [standalone]
| From | "Heinrich Wolf" <invalid@invalid.invalid> |
|---|---|
| Date | 2012-07-29 17:20 +0200 |
| Message-ID | <jv3kb3$fk6$1@news.m-online.net> |
| In reply to | #23892 |
"Chicken McNuggets" <chicken@mcnuggets.com> schrieb im Newsbeitrag
news:jv3jqk$r1t$1@speranza.aioe.org...
> Hi,
>
> So I am aware of the exec family of functions and the system function to
> execute external commands but they do not seem to offer the functionality
> to allow me to get the output of said executable so I can use it in the
> rest of my program. For instance a simple example would be to use the "ls"
> command. I would want to get the output of the directory listing and be
> able to manipulate it later on in my program.
>
> Is there an easy way to do this? I realise that this is technically not
> standard C and is most likely a POSIX extension but it would be nice if
> someone could offer some advice.
>
> Thanks.
Do you also know pipes?
if ((fp = popen("ls")) != NULL)
{
while (fgets(Buffer, sizeof(Buffer), fp))
puts(Buffer);
fclose(fp);
}
[toc] | [prev] | [next] | [standalone]
| From | Chicken McNuggets <chicken@mcnuggets.com> |
|---|---|
| Date | 2012-07-29 16:24 +0100 |
| Message-ID | <jv3kis$s2v$1@speranza.aioe.org> |
| In reply to | #23894 |
On 29/07/2012 16:20, Heinrich Wolf wrote:
> Do you also know pipes?
>
> if ((fp = popen("ls")) != NULL)
> {
> while (fgets(Buffer, sizeof(Buffer), fp))
> puts(Buffer);
> fclose(fp);
> }
Ah. Thank you. popen() looks exactly like what I was looking for.
[toc] | [prev] | [next] | [standalone]
Page 1 of 5 [1] 2 3 4 5 Next page →
Back to top | Article view | comp.lang.c
csiph-web