![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | how to add Unix line breaks Hi. So, is it possible to use set-content (or something) to add Unix line breaks to a text file? -- Antti |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: how to add Unix line breaks the Community extentions contain a cmd-let called "ConvertTo-UnixLineEnding" you can find the extentions here.. http://www.codeplex.com/PowerShellCX rgds, Bart "Antti" <ab@cd.ef> wrote in message news:OAwIPDHxHHA.4604@TK2MSFTNGP03.phx.gbl... > Hi. > > So, is it possible to use set-content (or something) to add Unix line > breaks to a text file? > > -- > Antti > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: how to add Unix line breaks "Bart" <notsovalid@oiuytr.com> wrote in message news:e7xqvYHxHHA.4588@TK2MSFTNGP05.phx.gbl... > the Community extentions contain a cmd-let called > "ConvertTo-UnixLineEnding" > > you can find the extentions here.. > > http://www.codeplex.com/PowerShellCX > You could just use `n as in: "hi`nthere" | Set-Content -Encoding ascii foo.txt The problem is that both Set-Content and Out-File append a Windows newline sequence e.g.: 8> fhex foo.txt -Columns 16 Address: 0 1 2 3 4 5 6 7 8 9 A B C D E F ASCII -------- ----------------------------------------------- ---------------- 00000000 68 69 0A 74 68 65 72 65 0D 0A hi.there.. So processing the file to convert Windows newline sequences to \n (ie use ConvertTo-UnixLineEnding) is probably the best way to go. -- Keith |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: how to add Unix line breaks Ok. Thanks for your answers. -- Antti |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to get pid, equivalent to $$ in unix | Frank | PowerShell | 1 | 07-27-2007 01:26 PM |
| Facts about Unix | Mrs. Happy | Vista General | 25 | 07-13-2007 07:49 PM |
| RE: Line Count (UNIX wc) | red_deer_hill | PowerShell | 0 | 01-26-2007 12:07 PM |
| RE: Line Count (UNIX wc) | Sung M Kim | PowerShell | 0 | 01-24-2007 11:52 AM |
| Re: Line Count (UNIX wc) | /\/\o\/\/ [MVP] | PowerShell | 0 | 01-24-2007 10:21 AM |