From fddaa1d3a389418ceeebb3d10282ba471b53a9a8 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 1 Mar 2023 17:22:31 +0100 Subject: test --- .local/bin/idea | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.local') diff --git a/.local/bin/idea b/.local/bin/idea index 0c212dd..b5fc477 100755 --- a/.local/bin/idea +++ b/.local/bin/idea @@ -1,19 +1,23 @@ #!/bin/sh -e if [ -z "$1" ]; then - thought=$(cat | xargs) + thought=$(cat -) elif [ -f "$1" ]; then - thought=$(cat "$1" | xargs) + thought=$(cat "$1") else thought="$*" fi +thought_a="$(printf "%s" "${thought}" | sed "s/\n/
/")" +exit date=$(date '+%a, %d %b %Y %T') html_fmt='\t\t\t\t

'"${date}"'<\/h3>\ \t\t\t\t

\ -\t\t\t\t\t'"${thought}"'\ +\t\t\t\t\t'"${thought_a}"'\ \t\t\t\t<\/p>\ ' +echo "%s" "${html_fmt}" +exit case $(hostname -s) in mother|po-rbo) sed="sed -i" ;; fbsd-tp) sed="sed -i ''" ;; -- cgit v1.2.3