I've done a bit of reading on this, but my shell scripting leaves to be desired. I want to be able to output the total number of lines in my entire project, which contains sub-folders. I got this far:
Code:
cat `ls -R1 | grep -v ./ | grep -v .gif | grep -v .jpg`
Passing this to `wc -l', however, doesn't work. In fact, this example is broken at `cat' because I can't figure out how to prepend the full path to the file names (or use any other hack) and I get results like this:
Code:
cat: fck_contextmenu.css: No such file or directory
cat: fck_dialog.css: No such file or directory
cat: fck_editor.css: No such file or directory
simply because those files reside in sub-directories of the cwd but are `ls'ed as ./<file> for all `cat' knows.
Any ideas around this? I'm sure it's quite simple but I can't seem to catch it.