Is there a sed
command to remove trailing white spaces?
Asked
Active
Viewed 2.1k times
3

Jonathan Leffler
- 730,956
- 141
- 904
- 1,278

carte blanche
- 10,796
- 14
- 46
- 65
1 Answers
11
use the command below:
sed 's/\s*$//g' your_file

Vijay
- 65,327
- 90
- 227
- 319
-
Use - `sed -i 's/\s*$//g' file_name` to update the file directly – pushkarajthorat Aug 25 '16 at 18:24