Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

New Line

Posted on March 4, 2013March 10, 2016 By David Kittell

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

Originally Posted on March 4, 2013
Last Updated on March 10, 2016
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code CSharp JavaScript PHP PowerShell VB VB.NET Carriage ReturnLine BreakNew Line

Post navigation

Previous post
Next post

Related Posts

SQL – Log Parser Studio – User-Agent

Posted on December 4, 2015December 4, 2015

Caution: These scripts will take some time to run on large logs. /* List Browser types used */ SELECT DISTINCT CASE strcnt(cs(user – agent), ‘Chrome’) WHEN 1 THEN ‘Chrome’ ELSE CASE strcnt(cs(user – agent), ‘Firefox’) WHEN 1 THEN ‘Firefox’ ELSE CASE strcnt(cs(user – agent), ‘MSIE+6’) WHEN 1 THEN ‘IE 6’…

Read More

NPI Database

Posted on May 7, 2015October 26, 2015

If you work in medical databases you are likely familiar with the site CMS NPI Search I have had a few projects that need the ability to validate NPI numbers so based on data at CMS.gov I have worked out a solution to get the data into a database that…

Read More

Ektron Content Folder Names

Posted on February 4, 2014October 26, 2015

SELECT c.[content_id] ,c.[content_title] ,c.[content_html] ,c.[content_status] ,CASE WHEN c.[content_status] = ‘A’ THEN ‘Approved’ WHEN c.[content_status] = ‘O’ THEN ‘Checked Out’ WHEN c.[content_status] = ‘I’ THEN ‘Checked In’ WHEN c.[content_status] = ‘S’ THEN ‘Submitted for Approval’ WHEN c.[content_status] = ‘M’ THEN ‘Marked for Deletion’ WHEN c.[content_status] = ‘P’ THEN ‘Pending Go Live…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories
  • Raspberry Pi - Remove Default Apps
  • PowerShell - Change Windows CD/DVD Drive Letter
©2025 David Kittell | WordPress Theme by SuperbThemes