Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line feed Character in UNIX

Status
Not open for further replies.

tekkid

Technical User
Dec 28, 2001
50
US
Normal text editors have a aski13, what does UNIX recognize? Can't figure this out please help if you can.


Thanks,

Kidd
 
What's normal? :)

Unix was here LONG before MSDOS. Unix always has used the LF (line feed) character (ascii 10) for line endings. Microsoft, in their Infinite Wisdom, decided to use that AND ascii 13 (CR or Carriage Return).

So what's the actual question? Most programming languages that run on both platfroms (Perl etc.) handle these differences for you. So do programs like FTp if you use TEXT mode to transfer. Unixes almost always have conversion filters to change text files to and from these formats, most printers can automatically add CR's after LF's and so on.

What is the actual problem you need to solve? Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
If your talking scripting then

echo "hello world\n"

\n = newline

or

echo "hello world\c"

\c = no line break

or

echo "hello world\b\b\b\b\b\b\b\b\b\b\b\c"

\b = backspace

so cursor would appear over h in hello

Hope this is what your after.

Mike --
| Mike Nixon
| Unix Admin
| ----------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top