diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-06-10 01:02:00 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-06-10 01:02:00 +0200 |
commit | b0f6e0b064264b5b27d1eb7a71c43c6640e16632 (patch) | |
tree | 74273a727b6881ce242a67017ac28eb06418bff2 /scripts/whitespace | |
parent | eba37646d86a1b3149050ee99395fc5d844dd001 (diff) | |
download | dotfiles-b0f6e0b064264b5b27d1eb7a71c43c6640e16632.tar.gz |
added whitespace
Diffstat (limited to 'scripts/whitespace')
-rwxr-xr-x | scripts/whitespace | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/whitespace b/scripts/whitespace new file mode 100755 index 0000000..464cf92 --- /dev/null +++ b/scripts/whitespace @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ $# -eq 0 ]; then + echo No arguments + exit 1 +fi + +FILES=() + +for arg in $@; do + [ -d $arg ] && FILES+=($(find $arg -type f)) + [ -f $arg ] && FILES+=($arg) +done + +grep -IHn -e ".*\s$" ${FILES[@]} |