How to install all packages whitch aptitude found?
For example:
sudo aptitude search eclipse
... found approximately 66 packages. How I can install all found packages without write separately?
You can use the * symbol as a wildcard. I know it works when deleting files that may all be titled the same but have different dates attached to the file name.
In your case, you would type:
sudo apt-get install eclipse*
This will install all packages that start with the string eclipse
versus:
sudo apt-get install eclipse
This will only install packages name "eclipse"
"eclipse*" if you intend passing it to apt-get as a pattern rather than expand it on the shell.
I'd do something like this:
sudo apt-get -d -u install $(apt-cache search -n eclipse | cut -f1 -d' ' | grep -vE 'redeclipse|^lib')
Note the -d for --download-only. When you've made sure that it will install only what you want/need, remove the -d from the apt-get command.
apt-cache search -n's output is far less "noisy" than aptitude search's, so is easier to work with in a pipeline.
redeclipse is a game, not part of eclipse. And you want libs to be pulled in as a dependancy so they're marked as auto-installed. You can add any other packages you don't want installed to the grep -vE argument.