Normally xargs will put several arguments on one command line. To limit it to one argument at a time, use the -n option:
$ seq 3 | xargs -n 1 echo 1 2 3
Documentation
From man xargs:
-n max-args
Use at most max-args arguments per command line. Fewer than max-args arguments will be used if the size (see the -s option) is exceeded, unless the -x option is given, in which case xargs will exit.
Difference between -n and -L
-L is similar but has an extra feature: unlike -n, lines with trailing blanks are continued onto the next line. Observe:
$ echo $'1 \n2\n3\n4' 1 2 3 4 $ echo $'1 \n2\n3\n4' | xargs -L 1 echo 1 2 3 4 $ echo $'1 \n2\n3\n4' | xargs -n 1 echo 1 2 3 4
xargsnot the command you need. You are using two external commandsseqrespectivelyxargsto achieve something that your shell can do it on it's own. Take for example Brace expansion in bash. You could then issueprintf '%s\n' {1..10}to get the desired resultBrewfilefor homebrew in my own bootstrap script. I'm not sure I can use any features of the shell to do the job.nocommentandonelinecould be combined into one functionnocomment_onelineand putsed '/^#/d;/^.$/d' "$1" | sed -e :a -e '$!N;s/\n/ /;ta'