Often we forget what code we need to use to create a new line (line break), hopefully this will help.
- n = CR (Carriage Return)
- Used as a new line character in Unix
- r = LF (Line Feed)
- Used as a new line character in Mac OS
- nr = CR + LF
- Used as a new line character in Windows
- (char)13 = n = CR
- Same as n
- Environment.NewLine
- Any of the above code based on the operating system
Write-Output "`r`nLine 1" Write-Output "`r`nLine 2" Write-Output "`r`nLine 3"
Wikipedia Reference: http://en.wikipedia.org/wiki/Newline
Last Updated on March 10, 2016