Re: How to pass arguments with '*' to execvp()?
From: Bjorn Reese (breese_at_see.signature)
Date: 11/28/05
- Next message: Thomas Maier-Komor: "Re: how to know is the command exist at all?"
- Previous message: ul: "how to know is the command exist at all?"
- In reply to: Alex Vinokur: "Re: How to pass arguments with '*' to execvp()?"
- Next in thread: Mr. Uh Clem: "Re: How to pass arguments with '*' to execvp()?"
- Reply: Mr. Uh Clem: "Re: How to pass arguments with '*' to execvp()?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Nov 2005 15:11:28 +0100
Alex Vinokur wrote:
> But what to do with the following command line:
> find . -name "*.c" -print
Nils already provided you with the proper solution. Expressed in
code, it is something like this (disclaimer: untested code)
strcpy(command, "find . -name \"*.c\" -print");
execl("/bin/sh", "/bin/sh", "-c", command, NULL);
-- mail1dotstofanetdotdk
- Next message: Thomas Maier-Komor: "Re: how to know is the command exist at all?"
- Previous message: ul: "how to know is the command exist at all?"
- In reply to: Alex Vinokur: "Re: How to pass arguments with '*' to execvp()?"
- Next in thread: Mr. Uh Clem: "Re: How to pass arguments with '*' to execvp()?"
- Reply: Mr. Uh Clem: "Re: How to pass arguments with '*' to execvp()?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]