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:
There are 4 alternatives - vote for the best!
Shows a file without comments (at least those starting by #)
- removes empty lines
- removes lines starting by # or "some spaces/tabs then #'"
Useful when you want to quickly see what you have to customize on a freshly installed application without reading the comments that sometimes are a full 1000 lines documentation :)
But it's dirty and incomplete, to my mind
My original goal was to remove lines like "\t*#" but I can't figure out how to do a egrep '\t' on a command-line. Two workarounds if needed:
egrep -v 'press control + V then TAB then #' /your/file
egrep -v -f some_file /your/file #where some_file contains what you want to exclude, example a really inserted TAB
easier to remember
>> non-empty lines : denoted by -v -e '^$'
>> that do not start with # (comments) or : denoted by -v -e '^[#\]'
>> and does not include : denoted by -v -e '\'
(Note that we use -v only once)
If you can do better, submit your command here.
You must be signed in to comment.