> 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 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe