Alex's lightning talk on reading the python code of OpenShot to add a
keyboard short cut reminded me of some of Diomidis Spinellis's blog
posts - his IEEE Software "Tools of the Trade" columns, the latest of
which are now available as podcasts
http://www.computer.org/portal/web/computingnow/tools-of-the-trade

Applied Code Reading: GNU Plotutils
http://www.spinellis.gr/blog/20090811/index.html
Applied Code Reading: Debugging FreeBSD Regex
http://www.spinellis.gr/blog/20090916/

I think they may be from his book "Code reading:
the open source perspective" 
http://books.google.com/books?id=8lYbNfsAVT4C&hl=en



I should have read one post more closely "Process Substitution" was
something I didn't know, advanced plumbing ...
http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/process-sub.html

Chapter 22. Process Substitution
Process substitution is the counterpart to command substitution. Command
substitution sets a variable to the result of a command, as in
dir_contents=`ls -al` or xref=$( grep word datafile). Process
substitution feeds the output of a process to another process (in other
words, it sends the results of a command to another command).

Command substitution template


command within parentheses
        
        >(command)
        
        <(command)
        

His example follows..

To locate classes that call the method userGet, but don't call the
method userRegister we process their source code with the following bash
script.

comm -23 \
<(find . -name \*.java -print0 | xargs -0 grep -l userGet | sort) \
<(find . -name \*.java -print0 | xargs -0 grep -l userRegister | sort)

The script depends on a wonderful feature of the bash shell: the ability
to make the output of a command appear as a file.




_______________________________________________
Free-software-melb mailing list
[email protected]
http://lists.softwarefreedom.com.au/mailman/listinfo/free-software-melb

Reply via email to