How to create a bash function with variable parameters/arguments to grep several keywords/tags
- by CornSmith
I'm using the :!grep "tag1" filename | grep "tag2" filename | grep -n "tag3 or more" filename command in vim to search for my code snippets based on their tags (a simple comment at the top of a snippet) in one big file. I use snippets to remember tricky things.
This is painful to write out each time. I'd like to make an alias, or function to do…