summaryrefslogtreecommitdiffstats
path: root/.scripts/tools
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-03-21 15:02:51 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-03-21 15:02:51 -0400
commit08a9db0554c3e5b37e7668be3d0ae3839f0ce901 (patch)
treec4336d22be78600120e93f7c5bf519ffb46de189 /.scripts/tools
parent643886a7c9c61d9fb7eb6f4e906bf2360be44c6f (diff)
downloadeibhear-08a9db0554c3e5b37e7668be3d0ae3839f0ce901.tar.gz
eibhear-08a9db0554c3e5b37e7668be3d0ae3839f0ce901.tar.zst
eibhear-08a9db0554c3e5b37e7668be3d0ae3839f0ce901.zip
style
Diffstat (limited to '.scripts/tools')
-rwxr-xr-x.scripts/tools/rotdir10
1 files changed, 1 insertions, 9 deletions
diff --git a/.scripts/tools/rotdir b/.scripts/tools/rotdir
index 2fabeda..c04666d 100755
--- a/.scripts/tools/rotdir
+++ b/.scripts/tools/rotdir
@@ -1,16 +1,8 @@
#!/bin/sh
-if [ -z "$1" ]; then
- echo usage: rotdir regex 2>&1
- exit 1;
-fi
-
+[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1
ed -s <<EOF
-# Read in all files in the current dir
r !find "$PWD" -maxdepth 1
-# Search all lines for regex, move to top
g/$1/m0
-# Print all lines
,p
-# Force quit
Q
EOF