[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maximum limit of pipes in a single command ?

From: Dave B
Subject: Re: Maximum limit of pipes in a single command ?
Date: Thu, 28 Aug 2008 17:24:02 +0200
User-agent: Thunderbird (X11/20080725)

Keshetti Mahesh wrote:

> Hi all,
> Can anyone tell me what is the maximum limit of number of pipes
> that can be opened through a single command ?
> e.g; # <cmnd> ||||||||||||||||||||||||||||||| .....|

For what is worth, on my system (bash 3.2.33(1)-release) I can have 3332
pipes before bash gives an error. I used this command:

(printf 'echo a';for i in `seq 1 3332`;do printf '|cat';done;echo) | bash

If I replace 3332 with 3333, bash gives

bash: line 1: syntax error near unexpected token `|'

Curiously, with this command

(printf 'echo a';for i in `seq 1 3330`;do printf '|(read a;echo $a)';
done;echo) | bash

the limit is 3330.

Ulimit tells me that the maximum number of user processes is 16381, so it
seems unrelated to that.

Why do you want to know?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]