xargs – place the argument in a different location in the command
The solution: -I -I lets you name your argument and put it anywhere you like. E.g. ls | xargs -n 1 -I {} echo prefix_{} (replace {} with any string)
The solution: -I -I lets you name your argument and put it anywhere you like. E.g. ls | xargs -n 1 -I {} echo prefix_{} (replace {} with any string)
The following will only work if you do not have spaces in your input: xargs -L 1 xargs –max-lines=1 # synonym for the -L option from the man page: -L max-lines Use at most max-lines nonblank input lines per command line. Trailing blanks cause an input line to be logically continued on the next input … Read more