Open a list of files in vim from a grep command (linux)
This helpful command lets you open only files that match a certain condition - in a directory and all it's subdirectories. It's great way to open files that need editing that may be located all over a directory structure of a website.
vi `grep -rl 'example.js' *`
This command will open all files that contain the string "example.js" in the current directory and all its subdirectories!
vi `grep -rl 'example.js' *`
This command will open all files that contain the string "example.js" in the current directory and all its subdirectories!
| Link: | helpfulcoder.blogspot.com...Search for more tips related to this link |
| Rating: | 100% positive, 1 Vote |
| Categories: | web design linux |
| Added: | on Jan 10, 2008 at 12:26 pm |
| Added By: | an anonymous user |

