On 10/30/07, Nikolay Molchanov <[EMAIL PROTECTED]> wrote: > Thank you very much, guys, for giving this example: > > % yes | pkgrm ... > > It really works! But it is absolutely not understandable why a standard Unix > solution > does not work: > > % echo "y" | echo "y" | pkgrm ... > > What is interesting, the first "y" works, but the second "y" does not. Why? > Is it a bug? > Here is an example:
only the second "y" is being passed to the standard input of pkgrm, the first y is passed to the standard input of the second echo, that is why that is wrong > > # echo "y" | echo "y" | pkgrm SPROprfns > > The following package is currently installed: > SPROprfns Sun Studio 12 Non-ship commands for Performance Analyzer > (i386) 12.0,REV=2007.10.30 > > Do you want to remove this package? [y,n,?,q] > ## Removing installed package instance <SPROprfns> > > This package contains scripts which will be executed with super-user > permission during the process of removing this package. > > Do you want to continue with the removal of this package [y,n,?,q] > Removal of <SPROprfns> failed. > No changes were made to the system. > # > > BTW, the same solution works just fine for pkgadd. > > Thanks, > Nik > > > This message posted from opensolaris.org > _______________________________________________ > opensolaris-discuss mailing list > opensolaris-discuss@opensolaris.org > nacho _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org