Sometimes, it is nice to have a full script to check for something across your codebase. For instance, when you are on windows, or you are in a toolsmith role and have a team of non technical people to support. Other times though, you can just revel in the power of unix.
adam@feisty$ find . -name "*.pm" -exec grep -i -f dev_patterns.txt -H -n {} \\; > dev_notes.txt
does more or less the same thing as my developer notes script.
As a bit of explanation, what this does is…
- Search (find)
- Starting in the current directory (.)
- every perl module (*.pm)
- Once found, do a case insensitive search (-i)
- For each of the patterns in dev_patterns.txt (-f)
- And display the file name (-H)
- And line number (-n)
- And pump the output to a file (>dev_notes.txt)
Depending on your variant of unix, your flags might vary.
Your “adam@feisty” prompt implies that you’re using the “Feisty Fawn” Ubuntu release. I’ve installed this recently on an old Dell Dimension desktop PC at home and am just getting used to working with it. I’d be interested in any tips and comments you might care to share about Ubuntu and this release in particular. One of the things I’ve been having trouble with is getting a VNC server to work without having to login first (e.g. Remote Desktop). Have you tried anything like this?
Thanks,
Martin
I’m still very much an ubuntu newbie. I learned linux using Redhat then spent a couple years on Solaris and HPUX. This whole apt-get, deb packaging and ‘no root just sudo’ thing is still all new to me too. 🙂
I’ve actually only got the server version installed in a virtual pc session (to try and play with a socialtext install) so haven’t dove into the unix deepend again quite yet.