I learned from answers under this question: Making xargs work in Cygwin that option xargs -I does not work properly under Cygwin. There were some workarounds, but unfortunately it does not help in my case.
My question is, how can I approach the same result as:
..somthing that produces multiple lines.. | xargs -I % command -option1 % -option2 %
under Cygwin environment?
Edit:
To clarify, I would like to get some values from stdin and invoke the "command", putting them into two places as its arguments "%". I would like to invoke my command multiple times on a data produced by the "something".
Example 1: (i haven't been programming in cpp for a huge time so please forgive me mistakes)
find -name *.cpp | cut -d. -f1 | xargs -I % gcc -o %.o -I %.h %.cpp
Example 2:
cat songs_to_process.txt | xargs -I % convert --format=mp3 --source=%.avi --output=%.mp3