The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-18-2008
vparunkumar vparunkumar is offline
Registered User
  
 

Join Date: Dec 2007
Location: Chennai , India
Posts: 18
Unhappy need clarification about tr -d command ?

Hi ,
I need your help to know the exact operation of this following code ..

cat file1 | ux2dos | tr -d ''>>file2

file1 contains only one line : "DTS-PO\SPECTRUM WO 56"
the data contains a META CHAR "\" .. look at the above line.
But , The file2 output contains : "DTS-POSPECTRUM WO 56^M"
The "\" does not appear in the file2.
The ux2dos appends ^M in the end of line.

My questions are :

1. what is the operation performed by tr -d '' ?
what is the usage of this arrow mark option ?
2. is the arrow option ignore the ALL Special meta char's? or the ux2dos ignore or delete the special META Char's?
3. is there any way to allow the meta char's would be appeared in the file2?

Note : Environment = IBM AIX 5.3
Shell = ksh