Hello:

 

When transferring files from the Windows environment to the Linux environment we execute a script to remove the \cr characters. The script performs a simple

 

tr -d '\r'  < input  > output

 

Recently we were testing with files that contained a string with a single quote – “Paym’t”

 

What the tr command is doing is not only removing the “\cr” characters but also the single quote. What we ended up with was “Paymt”

 

 

Any ideas?

 

Ami I using the tr command incorrectly?

 

 

We are running:

 

cat /proc/version

Linux version 2.6.32-504.12.2.el6.x86_64 (mockbuild@x86-027.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-9) (GCC) ) #1 SMP Sun Feb 1 12:14:02 EST 2015

 

cat /etc/redhat-release

Red Hat Enterprise Linux Server release 6.6 (Santiago)

 

 

Thanks.   

 


 

email-signature-image_0003_CT_IconLogo_Sml_RGB.png

Joe Piette

Senior Technical Specialist

Integration Architecture

Canadian Tire Corporation

2190 Yonge St.
Toronto, ON
M4P 2V8
T: 416.480.8867  |  C: 416.433.4124

Joe.Piette@cantire.com

 

email-signature-image_0002_COC_Standalone_Mark_4C_BIL_ENG.png