Re: using pipes with g_spawn_command_line_sync
- From: Tristan Van Berkom <tvb gnome org>
- To: Luka Napotnik <luka napotnik gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: using pipes with g_spawn_command_line_sync
- Date: Wed, 23 Aug 2006 16:08:00 -0400
Luka Napotnik wrote:
Hello.
I am unable to run a command with g_spawn_command_line_sync() that uses
pipes. For example "echo \"bla\" | wc -l" gives the exact output as the
command insted "1". Other commands without the pipe execute with no
problem. What's the problem?
I'm afraid that this doesnt make sence:
gives the exact output as the command insted "1"
are you saying that it is outputting "1" when you expected something else ?
otherwise - what is it outputting exactly instead ?
If it is indeed broken and you're not getting the desired "1" that one
would expect... you might try prepending the interpreter to that line
like so: "/bin/sh echo \"bla\" | wc -l"
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]