Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SED command to remove trailing white spaces [duplicate]

Tags:

sed

Is there a sed command to remove trailing white spaces?

like image 759
carte blanche Avatar asked Dec 04 '25 16:12

carte blanche


1 Answers

use the command below:

sed 's/\s*$//g' your_file
like image 79
Vijay Avatar answered Dec 06 '25 16:12

Vijay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!