Karl Eichwalder <[EMAIL PROTECTED]> writes: > Dealing with paragraphs consisting of just one long line a feature to > add a newline at the end would be handy. At the moment I'm using this > command to turn DOS like files into files following unix conventions: > > tr -d '\15' <$f | sed 's/\([[:alnum:]].*\)$/\1\n/' | fmt > > There is probably a better way to accomplish such a job.
fmt -s does part of what you want. It sounds like you'd like another convenience option to fmt, an option that causes fmt to behave as if every nonempty pair of adjacent input lines was separated by an empty line. If we call that option -e, say, then "tr -d '\15' <$f | fmt -e" would do what you want. -e would imply -s. _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils
