DevScripts/log_command.sh

Run command and log it and it's output into a file

curl -sSL https://sh.devminer.xyz/log_command.sh | sh
#!/usr/bin/env sh

FILE="$1"
shift

DATE="$(date --rfc-3339=seconds)"

echo "${DATE}$@" > "$FILE"
$@ | tee -a "$FILE"