10 Mar
2007
10 Mar
'07
7:42 p.m.
cat foo.lhs | grep -e "^>" | sed "s/^> //"
Running for the Useless Use of cat Award? A simpler version would be: sed -n -e 's/^>//p <foo.lhs I don't guarantee that this will work correctly, tho. Maybe sed -n -e 's/^> //p <foo.lhs will work better? This said, the OP talked about TeX, so presumably he uses the other format, so maybe a better sed would be: sed -n -e '/^\\begin{code}/,/\\end{code}/{/^\\begin{code}/d;/^\\end{code}/d;p}' <foo.lhs -- Stefan