voidrice/.scripts/tools/rotdir

9 lines
123 B
Text
Raw Normal View History

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