|
|
Re: sed command for words into new line. Re: \n in the substitution string not working: As you can see, with GNU sed 4.1.2 within the bash shell, both worked just fine. > My test file only had one space in one of the > positions...hence, two words on that line. Which also happened in my results, as would be expected. You might try replacing the '\n' or "\\n" with '\x0a' in both cases which worked for me as well. Both \n and \x0a work on my recent Gentoo install, with Gsed 4.14. Neither works on my apple Tiger (--version and -v don't work, but looking through the binary the string v1.6 appears, which might or might not be relevant). Neither works on the solaris box which has an older gnu version, can't remember which. The lesson seems clear - get a new Gnu version and enjoy life! The number of times I wished for this! Regards, One happy hominid., Maximillian Murphy
|
|