Posts Tagged ‘bash’

Count number of lines in a file

Thursday, February 26th, 2009 by webstersprodigy

“find . -type f -exec cat {} \; | wc -l;” and if you don’t want repeats “find . -type f -exec cat {} \; | egrep \\S | wc -l”

Golay G24

Monday, September 8th, 2008 by webstersprodigy

This is a dirty implemenation of Golay correcting code using python. This is a solution to 18.13 problem 1 from Trappe and Washington’s Crytography book. To run this, you need bash, python, and the numpy libraries. To run, run golay.sh. The algorithm is located in golay.py

process monitoring with kill

Friday, June 6th, 2008 by webstersprodigy

Part of the reason why pid files often exist. This technique avoids parsing through ps output or rumaging around /proc.

wget login pages

Thursday, May 15th, 2008 by webstersprodigy

how do you scrape a page that you have to login to get to? Well, one way is to save the cookies and use –post-data, though this may depend on how the session is saved.


No computers were harmed in the 0.171 seconds it took to produce this page.