Subject: bug#20474: tr command

From: Joseph Piette <[email-masked]>
Date: Thu, 30 Apr 2015 16:31:01 +0000

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 ([email-masked]) (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.

________________________________

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
[email-masked]