Skip to main content
Welcome, Guest. Please login.

Login with username, password and session length
2 Guests, 0 Users

Recent

Topic: Remove whitespace from end of line in multiple files.  (Read 12231 times) previous topic - next topic

Remove whitespace from end of line in multiple files.

Linux

Code: [Select]
find . -type f -name '*.txt' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

macOS

Code: [Select]
find . -iname '*.txt' -type f -exec sed -i '' 's/[[:space:]]\{1,\}$//' {} \+