From http://stackoverflow.com/questions/9984748/how-do-i-get-sed-to-read-from-standard-input