From e7a4a864cdca93dec9af2db417be3839d58e8761 Mon Sep 17 00:00:00 2001 From: bth Date: Sat, 13 Jan 2024 10:08:39 -0800 Subject: [PATCH] trying out a bash dispatcher --- bash/next/next.sh | 3 --- um | 12 ++++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100755 um diff --git a/bash/next/next.sh b/bash/next/next.sh index a5885d0..cf6dfb5 100755 --- a/bash/next/next.sh +++ b/bash/next/next.sh @@ -64,8 +64,6 @@ # may in certain situations conflict with the alias. The link should be "next.sh" -> ~/config/.. # 4. NOTE: I use 'e' rather than 'emacs', to use my clever emacs/emacsclient function. -e ` - ls | egrep '^[[:digit:]].*\.md|txt' | tail -n 1 | awk ' BEGIN { @@ -110,4 +108,3 @@ finalstr = sprintf("%s.%s", finalstr, $NF) END { print finalstr }' -` diff --git a/um b/um new file mode 100755 index 0000000..85a673b --- /dev/null +++ b/um @@ -0,0 +1,12 @@ +#!/bin/bash + +# catch first arguments with $1 +case "$1" in + next) + ~/dev/uldb/bash/next/next.sh $2 + ;; + *) + # else + echo "usage: um (next|last|cat|rename)" + ;; +esac