Bash script to remove dot end of each line

bash

Solution

Just use `sed`:

sed 's/\.$//' yourfile

- Escape the special character `.` using `\`.

- Put an achor `$` to only remove it from the end.

- To make infile changes use `-i` option of `sed`.

Problem

Unix command to remove dot at end of each line in file. Sample rec in file ``` 11234567 0. 23456789 5569. 34567810 1. 10162056 0. ```

Original source