On Sun, 14 Mar 2004, Steven N. Fettig wrote: > I can't figure out what the newline character is... I've tried \n \r &\, > etc. with no avail. I run the following: > > sed 's/[ ]/\n/g' my_test_text_document.txt
>From the sed man page: "2. The escape sequence \n matches a newline character embedded in the pattern space. You can't, however, use a literal newline character in an address or in the substitute command." I think this is a BSD thing, and sed on other systems does handle \n and other literals in substitutions. It's annoying enough that I just use Perl instead. perl -pe 's/ /\n/g' my_test_text_document.txt which actually would be better as perl -pe 's/\s./\n/g' my_test_text_document.txt -Warren Block * Rapid City, South Dakota USA _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"