Files ending in -function are for sourcing then calling as a function. Files
without -function are exactly the same except they are for calling as a script.
-Patches and bugs are very welcome via gitlab.
-
-Questions, feedback, etc are very welcome via email to Ian Kelling
-<ian@iankelling.org>. I will add any useful questions, answers, etc. to this
-file. If a mailing list / forum is ever called for, I will start one.
+Patches, bugs, and any feedback is very welcome via gitorious or email to
+Ian Kelling <ian@iankelling.org>.
This program is also part of a collection of programs,
-https://gitlab.com/iankelling/bash-programs-by-ian, which are unrelated except
+https://gitorious.org/bash-programs-by-ian, which are unrelated except
having the same author and being being bash programs.
$help"
return 1
fi
-
+
local index=0
local x prettycommand
for x in "$@"; do
index=$(( index+1 ))
done
-
+
local file="$*"
file="$(mktemp -d)/${file//[^[:alnum:]]/}"
- printf "%s\n%s\n\n" "log of $prettycommand" "$(date)" >"$file"
-
+ printf "%s\n%s\n\n" "log of $prettycommand" "$(date)" >"$file"
+
# we will propagate any errors
local e=$-
[[ $e == *e* ]] && set +e
[[ $e == *e* ]] && set -e
printf "\n%s\n%s\n%s" "----------------" "$(date)" "end of log" >>"$file"
-
+
echo -n "\$?=$ret "
echo -n "$prettycommand"
echo "[log] $file"
return $ret
-}
+}
logq "$@"
$help"
return 1
fi
-
+
local index=0
local x prettycommand
for x in "$@"; do
index=$(( index+1 ))
done
-
+
local file="$*"
file="$(mktemp -d)/${file//[^[:alnum:]]/}"
- printf "%s\n%s\n\n" "log of $prettycommand" "$(date)" >"$file"
-
+ printf "%s\n%s\n\n" "log of $prettycommand" "$(date)" >"$file"
+
# we will propagate any errors
local e=$-
[[ $e == *e* ]] && set +e
[[ $e == *e* ]] && set -e
printf "\n%s\n%s\n%s" "----------------" "$(date)" "end of log" >>"$file"
-
+
echo -n "\$?=$ret "
echo -n "$prettycommand"
echo "[log] $file"
return $ret
-}
+}