commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
In bash, this turns on auto cd. If a command is just a directory name, it cd's into that directory.
You can then do all the processing you wish... It's already sorted and only installed packages are listed.
EDIT: Now contains formatting option to list only package names! Also, disables truncating long package names.
NOTE: it's tilda i not dash i
This of course assumes that lesspipe is installed. You can view the contents of many, many types of files in this way. Once lesspipe is installed, add to your .bashrc
export LESSOPEN="| /usr/bin/lesspipe %s" less file.jar
export LESSCLOSE="/usr/bin/lesspipe %s %s"
Tested and works on Linux.
This works in bash. The "!!:0" limits the argument to man to be only the first word of the last command. "!!:1" would be the second, etc.
Only works for integer arithmetic.
Us dc instead of bc. RPN FTW!!!