0

I currently am running a command in tty1 on Ubuntu 10.04 to print SMDR data from my phone system. Problem is that the phone system automatically adds a CR and LF (I think) in to the end of the data it sends.

The output should look like this

Data line 1
Data line 2
Data line 3
etc.

It instead looks like this

Data line 1

Data line 2

Data line 3

etc.

I don't want the print to do this. I currently have the command cat /dev/ttyS0 > /dev/lp0 running

Is there a command that can stop this from happening ? Essentially, I want to continually echo ttyS0 to lp0.

0
0

You can do it with tr:

cat file_1 | tr -d "\r" > file_2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.