Skip to main content

Posts

Showing posts with the label code

Squeak, Seaside, Pier, and Smalltalk

Here is one interesting software development environment, especially for web applications. Squeak is an open source implementation of Smalltalk. Seaside is a Web Framework for developing web applications in Squeak. Pier is a CMS built on Seaside. DabbleDB is also built on Seaside -- an incredibly impressive web app. So far, I've installed it on my Mac iFive (OS X 10.4.10).

Strip bash comments with grep

Sometimes, you just want to see the code ... Let's say you want to look at a bash script, but strip out all the comments. Here's a sample command using grep that will display a bash script, without comments, to stout: grep -v "^#" commented-script.sh Notes: "-v" means invert the selection; i.e., only display the lines in the file that don't match. "^#" is the regular expression that matches "lines that start with #". "^" means only match the beginning of the line. Replace "commented-script.sh" with the file name of the file you want to strip. Tips: This command strips single line comments from any programming language. Just change the comment line character (";" instead of "#" for example). If you just want to read the comments, drop the "-v" switch.