0
In this link: https://superuser.com/a/180252/401901
The following command is used:
cat list.txt | xargs -I % echo cp % new_folder
What does the % %
usage mean?
All google search results are about using it in a modulo operation. Or, am I searching it in a wrong way?
Also, is there a name for this kind of usage?
Thank you!
Yep. This %-sign isn't some kind of shell operator, it's just being used by xargs as a placeholder string so xargs knows where to insert the strings that are being piped in via stdin. When I use xargs, I usually use "HERE" as my string for -I or -J, which makes it more clear that it's just a string to tell xargs to "insert the input right HERE in this command line". β Spiff β 2018-10-12T01:04:59.590