3 ms·
My favourite use is when installing packages using package managers, especially when I need the dev packages. Old fink example: sudo fink install lib{png,j
by danudey 17y ago
My favourite use is when installing packages using package managers, especially when I need the dev packages.
Old fink example:
sudo fink install lib{png,jpeg,ssl,whatever}{,-{dev,shlibs}}
which expands to:
sudo fink install libpng libpng-dev libpng-shlibs libjpeg libjpeg-dev libjpeg-shlibs libssl libssl-dev libssl-shlibs libwhatever libwhatever-dev libwhatever-shlibs
- jrockway 17y agoBrilliant. I am ashamed to admit that I usually say "apt-get install libfoo.*", wait for the downloads to start, hit Control-c, and then cut-n-paste the package names I actually want onto the command-line. It sounds bad when I type it out, but it's really not the most horrible thing ever. But your way is definitely like 83x better.
- yason 17y agoIf you don't know the exact package names, Ubuntu happily auto-completes apt-get and aptitude on package names. So I would just type "aptitude install libfoo" and hit tab a couple of times to see what libfoos can I install.
- jedbrown 17y agoOr `M-*` to expand all the completions and then, if necessary, delete the ones you didn't want. Beats typing the extensions.
- yason 17y agoThis is golden, I didn't know that. A perfect example of the infinite features that can be found in bash manual page. I've been using bash since the early 90's and I've written lots of non-trivial programs in bash, and I know a lot many other people don't know and yet I had somehow managed to miss this pearl.