dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit c4e9d7008ce21d17b058b538824c3e1154f18206
parent 2e7bd8d5f7dabffb5ec3ec4f11fa55ca2ff96edd
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri,  3 Aug 2018 18:33:43 -0400

Add fix whitespace script

Diffstat:
A.local/bin/fws | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/.local/bin/fws b/.local/bin/fws @@ -0,0 +1,16 @@ +#!/bin/sh +# +# ~/.local/bin/fws +# +# Remove trailing whitespace recursively. Pass in file extensions to +# search for. + +case `uname -s` in + CYGWIN*) ext='\r' ;; + *) ext="" ;; +esac + +for arg +do + find . -name *.$arg -exec sed -i -e "s/[[:space:]]+\$/$ext/g" '{}' \; +done