|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello all.
I am currently working on a script that is doing some simple processing of files. I have it set up to create a file with a math expression in it so that i can use BC to get the answer, a typical one looks like this: #file -34.23+403.3 this file is getting created from the paste command, merging two previous files. The problem is that it as adding the end of line character ^M to the end, and bc throws an error every time it reads the file. Ive been looking for a way to remove this character...i have tried some sed one liners that ive come across but none seem to work. any would be appreciated. thanks! |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
ryandle@gmail.com wrote:
> Hello all. > > I am currently working on a script that is doing some simple processing > of files. I have it set up to create a file with a math expression in > it so that i can use BC to get the answer, a typical one looks like > this: > > #file > -34.23+403.3 > > this file is getting created from the paste command, merging two > previous files. The problem is that it as adding the end of line > character ^M to the end, and bc throws an error every time it reads the > file. Ive been looking for a way to remove this character...i have > tried some sed one liners that ive come across but none seem to work. > any would be appreciated. thanks! > The command dos2unix removes that character. Or use a filter tr -d '\015' Janis |
|
![]() |
| Outils de la discussion | |
|
|