Skip to content

Instantly share code, notes, and snippets.

@pkozelka
Created September 24, 2023 12:04
Show Gist options
  • Save pkozelka/3bf46ecee9ae1c1c756cdb4a99ffb021 to your computer and use it in GitHub Desktop.
Save pkozelka/3bf46ecee9ae1c1c756cdb4a99ffb021 to your computer and use it in GitHub Desktop.
Remove trailing whitespaces
#!/bin/bash
find * -name '*.java' | xargs sed -i 's:^\(.*[^[:space:]]\)[[:space:]]*$:\1:;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment