Posts Tagged “command line”

Functional Programming with the Unix Command Line

by enum on June 25, 2009

I was pondering the unix command line the other day while reading sed & awk, and I came to the following revelation: variables aside, the unix command line is a lot like functional programming. Using the command line, you can (…)

Read the rest of this entry »

Replace Text Recursively with sed

by enum on June 17, 2009

Here is a quick little trick I discovered today when I needed to replace text in multiple files recursively: grep -rl -e <searchterm> * | xargs sed -i .bak ‘s/searchterm/newterm/i’ There might be a problem with files that have spaces (…)

Read the rest of this entry »