No, it doesn't look like it works correctly with newlines:

sun%>   od -c nums.txt                                  # basic datafile 
0000000   1  \n   2  \n   3  \n   4  \n
0000010
sun%>   tr '\n' '\0' < nums.txt | od -c -               # fails
0000000   1  \n   2  \n   3  \n   4  \n
0000010
sun%>   tr '\n' '5' < nums.txt | od -c -                # fails
0000000   1  \n   2  \n   3  \n   4  \n
0000010
sun%>   tr '1' '5' < nums.txt | od -c -                 # works
0000000   5  \n   2  \n   3  \n   4  \n
0000010
sun%>  


I'll have to see if I can do an upgrade on it.

Thanks for the prompt reply.

ray


On Jun 26, 2013, at 11:32 AM, Sergey Poznyakoff <g...@gnu.org.ua> wrote:

> Hi Ray,
> 
> Thanks for your report.  It looks like the tr command on your system
> cannot handle newlines.  Can you please check whether the following
> command
> 
>   tr '\n' '\0'
> 
> transforms newlines into ASCII zero characters?
> 
> Regards,
> Sergey

Reply via email to