[BusyBox] Problems with xargs !!!
Steven Scholz
steven.scholz at imc-berlin.de
Mon Mar 31 07:21:03 UTC 2003
Hi there,
it seems that you can't pass arguments through xargs:
~ # find . -name rc.sh | xargs egrep "ipcal"
eval `/bin/ipcalc --netmask ${IPADDR}`
eval `/bin/ipcalc --broadcast ${IPADDR} ${NETMASK}`
eval `/bin/ipcalc --network ${IPADDR} ${NETMASK}`
Works!
~ # find . -name rc.sh | xargs egrep -n "ipcal"
xargs: invalid option -- n
BusyBox v0.61.pre (2003.03.31-14:02+0000) multi-call binary
Usage: xargs [COMMAND] [-prt] [ARGS...]
Executes COMMAND on every item given by standard input.
Options:
-p Prompt the user about whether to run each command
-r Do not run command for empty readed lines
-t Print the command line on stderr before executing it.
Does _not_ work as expected!
But should bring the same result as
~ # egrep -n ipcal /etc/rc.sh
100: eval `/bin/ipcalc --netmask ${IPADDR}`
103: eval `/bin/ipcalc --broadcast ${IPADDR} ${NETMASK}`
108: eval `/bin/ipcalc --network ${IPADDR} ${NETMASK}`
Has somebody fixed this by any chance?
Thanks,
Steven
More information about the busybox
mailing list