If you need to monitor a log file in real time, then using a combination of tail and grep will allow you to watch the important parts of the file. However if the log file spans more than one line then it can quickly become difficult to read. By using sed you are able to [...]
Archive: grep
Posts Tagged ‘grep’
If you are working on a theme, you may find that there are hard coded links dotted all over the place. This can make testing a site offline (and thereby not on the same URL) a bit of a pain. Here is a quick fix for you: 1. Remove all hard coded links from the [...]
If you use the Magento event / observer system for extending Magento (if you don't you should) then you will find this little script handy for parsing out all of the events in the latest (eg Magento 1.4) version of Magento. This is a Linux shell script so either use it on your server or [...]
Sometimes it can be really hard to figure out exactly which file a chunk of code is coming from. At times like this the command line tool grep is immensely useful. This snippet of code will search all php files within a specified folder. It will check through all files and sub folders for the [...]