8 lines
123 B
Bash
Executable file
8 lines
123 B
Bash
Executable file
#!/bin/sh
|
|
[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1
|
|
ed -s <<EOF
|
|
r !find "$PWD" -maxdepth 1
|
|
g/$1/m0
|
|
,p
|
|
Q
|
|
EOF
|