Skip to main content
edited tags
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 267
added 5 characters in body
Source Link

I am writing a bash script and encountered this argument -I in answers here and here but I do not understand what it does. The manual is also not clear to me.

The second answer also states the following text which I also don't understand:

find /thisdir -type f -name "*.ogg" -print0 | xargs -0 -Imysongs mv -i mysongs /somedir 

The -I in the above command tells xargs what replacement string you want to use (otherwise it adds the arguments to the end of the command).

I am writing a bash script and encountered this argument in answers here and here but I do not understand what it does. The manual is also not clear to me.

The second answer also states the following text which I also don't understand:

find /thisdir -type f -name "*.ogg" -print0 | xargs -0 -Imysongs mv -i mysongs /somedir 

The -I in the above command tells xargs what replacement string you want to use (otherwise it adds the arguments to the end of the command).

I am writing a bash script and encountered this argument -I in answers here and here but I do not understand what it does. The manual is also not clear to me.

The second answer also states the following text which I also don't understand:

find /thisdir -type f -name "*.ogg" -print0 | xargs -0 -Imysongs mv -i mysongs /somedir 

The -I in the above command tells xargs what replacement string you want to use (otherwise it adds the arguments to the end of the command).

Source Link

What does the -I argument do from xargs?

I am writing a bash script and encountered this argument in answers here and here but I do not understand what it does. The manual is also not clear to me.

The second answer also states the following text which I also don't understand:

find /thisdir -type f -name "*.ogg" -print0 | xargs -0 -Imysongs mv -i mysongs /somedir 

The -I in the above command tells xargs what replacement string you want to use (otherwise it adds the arguments to the end of the command).