Is there a sed command to remove trailing white spaces?
Asked
Active
Viewed 1.9k times
2
Jonathan Leffler
- 698,132
- 130
- 858
- 1,229
carte blanche
- 9,522
- 11
- 41
- 60
1 Answers
10
use the command below:
sed 's/\s*$//g' your_file
Vijay
- 62,703
- 87
- 215
- 314
-
Use - `sed -i 's/\s*$//g' file_name` to update the file directly – pushkarajthorat Aug 25 '16 at 18:24