diff options
| author | JameyBear <WhispersofJ@gmail.com> | 2020-06-01 15:29:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-01 15:29:57 -0400 |
| commit | f820ccf4dd69d4cf784fca4fc0e1ae273993077e (patch) | |
| tree | da152f42dc7b4597b63bc63297032a640b410eb0 /.local/bin/rotdir | |
| parent | 87b0754319a00648cd20b7f013cc821868f6d25e (diff) | |
| download | eibhear-f820ccf4dd69d4cf784fca4fc0e1ae273993077e.tar.gz eibhear-f820ccf4dd69d4cf784fca4fc0e1ae273993077e.tar.zst eibhear-f820ccf4dd69d4cf784fca4fc0e1ae273993077e.zip | |
Shellcheck (#676)
Co-authored-by: WhispersOfJ <kaotiks@gmail.com>
Diffstat (limited to '.local/bin/rotdir')
| -rwxr-xr-x | .local/bin/rotdir | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/rotdir b/.local/bin/rotdir index 7313a42..7d32040 100755 --- a/.local/bin/rotdir +++ b/.local/bin/rotdir @@ -9,4 +9,4 @@ [ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1 base="$(basename "$1")" - ls "$PWD" | awk "BEGIN { lines = \"\"; m = 0; } /^$base$/ { m = 1; } { if (!m) { if (lines) { lines = lines\"\n\"; } lines = lines\"\"\$0; } else { print \$0; } } END { print lines; }" +find "$PWD" | awk "BEGIN { lines = \"\"; m = 0; } /^$base$/ { m = 1; } { if (!m) { if (lines) { lines = lines\"\n\"; } lines = lines\"\"\$0; } else { print \$0; } } END { print lines; }" |
