please explain the difference between Carriage return (`r) and New line (`n) in powershell

Can someone please explain the difference between Carriage return (`r) and New line (`n) in powershell.
Gopi RajuSystem AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alex Green3rd Line Server SupportCommented:
The /r stands for "return" or "carriage return" which owes it's history to the typewriter. A carriage return moved your carriage all the way to the right so you were typing at the start of the line. The /n stands for "new line", again, from typewriter days you moved down to a new line.

I did just pull that from google, pretty sure it's right :D
ste5anSenior DeveloperCommented:
They are two different non-printable characters in the ASCII table... usually used as text line terminator. The names come from the type write as already explained.

And because printers and modern computers are no type writers, we have a slight disagreement in the community, what the correct text line terminator should be:

CR LF is used by Windows, thus the original typewriter sequence to get the first position in the new line.
LF is used by Unix-style OS and MacOs.

Rumors tell that the LF was used to save a byte back in those days.

btw, LF is 0xA0 (10d) and CR is 0xC0 (13d)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.