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?

-- 
D.


Reply via email to