aboutsummaryrefslogtreecommitdiff
path: root/scripts/whitespace
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-06-10 01:02:00 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-06-10 01:02:00 +0200
commitb0f6e0b064264b5b27d1eb7a71c43c6640e16632 (patch)
tree74273a727b6881ce242a67017ac28eb06418bff2 /scripts/whitespace
parenteba37646d86a1b3149050ee99395fc5d844dd001 (diff)
downloaddotfiles-b0f6e0b064264b5b27d1eb7a71c43c6640e16632.tar.gz
added whitespace
Diffstat (limited to 'scripts/whitespace')
-rwxr-xr-xscripts/whitespace15
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[@]}