commit 1bb481792ca526e060edfd9467733fddc49f06a4 parent adf7bc171ecb66d7ea541847c13deebf8c827d57 Author: Sven Möller <sven-moeller@outlook.de> Date: Sat, 25 Dec 2021 08:15:10 +0100 Remove bashism Diffstat:
M | bin/.local/bin/bm | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bin/.local/bin/bm b/bin/.local/bin/bm @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh selector=fzf @@ -84,7 +84,8 @@ html () { to_html () { - echo "<h2>${1^}</h2>" + title="$(echo "$1" | head -c 1 | tr [:lower:] [:upper:])$(echo "$1" | tail -c +2)" + echo "<h2>$title</h2>" echo "<ul>" sed -e 's_^\(\S*\)\s*$_\1 \1_' -e 's_\s_">_' "$BM_DIR/$1" -e 's_^_<li><a href="_' -e 's_$_</a></li>_' echo "</ul>"