Skip to content

Files

Latest commit

 

History

History
31 lines (19 loc) · 644 Bytes

SC2267.md

File metadata and controls

31 lines (19 loc) · 644 Bytes

Pattern: Use of xargs -i

Issue: -

Description

xargs -i is a GNU specific option. It has been deprecated in favor of the POSIX standard option -I.

Note that -i will implicitly use {} as a token if nothing is specified, while -I requires it to be explicit.

Example of incorrect code:

# Implicit replacement string
xargs -i ls {}

# Explicit replacement string
xargs -imyfilename ls myfilename

Example of correct code:

xargs -I {} ls {}

xargs -I filename ls filename

Further Reading