thanks hal, that was evidently the only combination of quotes, escaping, and flags that I had somehow missed.

cat "klone report.txt" | sed "s/Thu Sep 29 ..:..:.. CDT 2011[ ]*[0-9]* KB remains, \(( STALLED ) at [-]\{0,1\}[0|1] KB\/sec current, \)\{0,1\}[0-9]\{2,4\}:..:..:.. at [0-9]* \(KB\/sec current, ..:..:..:.. at [0-9]* \)\{0,1\}KB\/sec average //g" | sed "s/^ditto: //g" | sed "s/: Input\/output error$//g" | sed "s/^\(\/[^\/]*\)\{3\}//g"

looks slightly better as

cat "klone report.txt" | sed -E "s/Thu Sep 29 ..:..:.. CDT 2011[ ]*[0-9]* KB remains, \(( STALLED ) at [-]?[0|1] KB\/sec current, \)?[0-9]\{2,4\}:..:..:.. at [0-9]* \(KB\/sec current, ..:..:..:.. at [0-9]* \)?KB\/sec average //g" | sed "s/^ditto: //g" | sed "s/: Input\/output error$//g" | sed "s/^\(\/[^\/]*\)\{3\}//g"

While I was swinging through the vines on the internet (googling) I ran into a fun saying, something akin to "a regular expression is something that looks like someone vomited on your keyboard" smile


I work for the Department of Redundancy Department