[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: RE: [BusyBox] Problems with xargs !!!
From: Ronny Arild <Ronny.Arild () no ! thalesgroup ! com>
Date: 2003-03-31 11:45:03
[Download RAW message or body]
| -----Original Message-----
| From: Steven Scholz [mailto:steven.scholz@imc-berlin.de]
| But would it be hard to change busybox's xargs to behave
| like xargs on other (let's say MY) machine!?
|
| So while parsing the command line just treat everything
| after (and including) the first argument without a "-" as the [command
| [initial-arguments]] as stated in xargs' man page.
|
| ~# find . -name rc.sh | xargs -t egrep -n "ipcal"
| | | |
| | | +- initial-arguments
| | +------ command (no "-")
| +---------- xargs argument
You can solve this by adding the following code to xargs_main():
int xargs_argc;
for (xargs_argc = 1; xargs_argc < argc; xargs_argc++)
if (*argv[xargs_argc] != '-')
break;
Then use xargs_argc as parameter to getopt() instead of argc, and
also use xargs_argc instead of optind below.
Ronny
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic