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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about " tr"

Status
Not open for further replies.

epidor

MIS
Jul 10, 2003
6
FR
Hi everybody !

What is the meaning of this, please ?

more fic|tr -d '\015' >result

Thanks.
 
It looks like something trying to remove carraige returns CR octal 015 from a file. Don't feel confident that it would work though
 
Thanks Stritzgi !

But It's not true.

Carraige return is 012.
I'm looking for 015 ???
 
man ascii:

Octal/Character
000 NUL | 001 SOH | 002 STX | 003 ETX | 004 EOT | 006 ACK | 007 BEL
010 BS | 011 HT | 012 NL | 013 VT | 014 NP | 016 SO | 017 SI


Hexadecimal/Character
00 NUL | 01 SOH | 02 STX | 03 ETX | 04 EOT | 05 ENQ | 06 ACK
08 BS | 09 HT | 0A NL | 0B VT | 0C NP | 0D CR | 0E SO

Decimal/Character
0 NUL 1 SOH 2 STX 3 ETX 4 EOT 5 ENQ 6 ACK
8 BS 9 HT 10 NL 11 VT 12 NP 13 CR 14 SO


Seems like the missing '015' in octal table is actually a 'CR' in other ascii conversion tables.


vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
This is common code where people work in MS and Unix environments sharing text files between them. The octal \015 is extra character needed by MS for end-of-line processing. In vi and Emacs this character shows up as ^M. (One character even though showing two.)

You might also see something like this instead...

dos2unix fic result

Sean aka Time Traveler

Visit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top