voidrice/.scripts/tools/rotdir

9 lines
123 B
Text
Raw Normal View History

2019-03-09 15:27:10 -05:00
#!/bin/sh
2019-03-21 15:02:51 -04:00
[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1
2019-03-13 11:29:11 +11:00
ed -s <<EOF
r !find "$PWD" -maxdepth 1
g/$1/m0
,p
Q
EOF