Andrew McDonough

Please note: This page is imported from my wiki, which hasn't been updated in over 10 years. Some of the formatting was lost during the import. I'll try to get around to fixing it someday.


sed is a stream editor. It takes input from a file, processes it, and outputs to STDOUT:

Substitutions: sed -e ‘s/Andrew/Andy/’ -e ‘s/McDonough/Donut/’ file

Read somefile and substitute all occurrences of somexpession with a replacement cat somefile.file | sed s/someexpression/replacement/

Find all words ending in the letters de in the word list, remove the de and print to the screen. grep -ri “.*de$” /usr/share/dict/linux.words | sed s/..$//

Andrew McDonough

Andrew McDonough is a consultant CTO and software developer, currently based between Berlin and London.

Follow Andrew on Twitter or Connect on LinkedIn