Re: Maximum limit of pipes in a single command ?

2008-08-28 Thread Paul Jarc
"Keshetti Mahesh" <[EMAIL PROTECTED]> wrote: > I followed the syntax properly. > But thats not the problem. Problem is how long can the concatenated > string can be ? If it's too long to fit in that command line, you could pass it this way: sed -f <(echo 's/old1/new1/;s/old2/new2/...') paul

Re: Maximum limit of pipes in a single command ?

2008-08-28 Thread Keshetti Mahesh
> sed's "s" command should be terminated with a final "/". If nothing > comes after the "s" command, then you can leave out the final "/", but > in your case, you need it: > sed 's/old1/new1/;s/old2/new2/;...' > I followed the syntax properly. But thats not the problem. Problem is how long can th

Re: Maximum limit of pipes in a single command ?

2008-08-28 Thread Paul Jarc
"Keshetti Mahesh" <[EMAIL PROTECTED]> wrote: > I modified the script a little bit to concatenate all > "s//" using pipes and ran single 'sed' at the > end. But its not working. Thats why I want to know how many pipes > can I open through a single command. Also, I have tried > concatenated the repl

Re: Maximum limit of pipes in a single command ?

2008-08-28 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Dave B on 8/28/2008 9:24 AM: > > If I replace 3332 with , 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)'

Re: Maximum limit of pipes in a single command ?

2008-08-28 Thread Keshetti Mahesh
> 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: > Thanks Dave for informing. > > Why do you want to know? > I have a bash script which replaces all tokens in a large with an identifier (an integer) by doing 'sed'

Re: Maximum limit of pipes in a single command ?

2008-08-28 Thread Dave B
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; # ||| .| For what is worth, on my system (bash 3.2.33(1)-release) I can have 3332 pipes before bash give

Maximum limit of pipes in a single command ?

2008-08-28 Thread Keshetti Mahesh
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; # ||| .| regards, Mahesh