commit 686f2bf2fbdee09417f17c0f6551430a783c7d25 parent 06a5ab6f36a47de32c65ff419d277df40db5e0a6 Author: Jacob R. Edwards <jacobouno@protonmail.com> Date: Mon, 30 Aug 2021 14:27:32 -0700 Add script to find directories without sub-directories Diffstat:
| A | local/bin/.local/bin/tips | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/local/bin/.local/bin/tips b/local/bin/.local/bin/tips @@ -0,0 +1,12 @@ +#!/bin/sh +# Copyright 2021 Jacob R. Edwards +# License: GPLv3 +# tips -- Find and display directories without sub-directories + +find "${@:-.}" -type d | awk '{ + if (x) { + if (index($0, x) != 1) + print x; + } + x = $0; +}'