in reply to Re^2: perlbrew: moving to a new perl with all current modules
in thread perlbrew: moving to a new perl with all current modules

... and xargs is well aware of that, and splits up the command line and executes the program multiple times if necessary.

  • Comment on Re^3: perlbrew: moving to a new perl with all current modules

Replies are listed 'Best First'.
Re^4: perlbrew: moving to a new perl with all current modules
by morgon (Priest) on Jun 17, 2012 at 10:50 UTC
    xargs needs a -n switch for that though - or does it not?

      The xargs program shipped with my Debian GNU/Linux system knows about the command line length limitation, and automatically wraps too long command lines into muliple programs. You can see the length limits easily:

      $ xargs --show-limits Your environment variables take up 2038 bytes POSIX upper limit on argument length (this system): 2093066 POSIX smallest allowable upper limit on argument length (all systems): + 4096 Maximum length of command we could actually use: 2091028 Size of command buffer we are actually using: 131072

      And to show that it does not produce an error, I create a command line that's 20 times that limit:

      $ yes | head -n 20910280 | xargs /bin/echo > /dev/null $