I am trying to pass multiple arguments to a program.
find binaries/$package/lib -iname "*.txt" | parallel java -jar proguard/proguard.jar @obfuscateprofile -injars $package.jar -outjars binaries/$package/$pacakge.jar -libraryjars {}
I can use echo as a demonstration:
find binaries/derbypro/lib -iname "*.txt" | parallel echo -libraryjars {}
I want the program to get multiple -libraryjars
arguments for each file found with find
. For example, if I have a directory with the following files in it:
file1.txt
file2.txt
file3.txt
And I run the command, I want it to be equivalent to running the program like this:
programname -libraryjars file1.txt -libraryjars file2.txt -libraryjars file3.txt
But what I get instead is this:
programname -libraryjars file1.txt
programname -libraryjars file2.txt
programname -libraryjars file3.txt
So when I run
find binaries/derbypro/lib -iname "*.txt" | parallel echo -libraryjars {}
I get
-libraryjars file1.txt
-libraryjars file2.txt
-libraryjars file3.txt
So it is executing multiple echo
programs. If I specify the number of parameters I am expecting with -N 3
it works fine, but I don't know how many files fine
will find.