Run command and log it and it's output into a file
curl -sSL https://sh.devminer.xyz/log_command.sh | sh
curl -sSL https://sh.devminer.xyz/log_command.sh -o log_command.sh
wget -qO- https://sh.devminer.xyz/log_command.sh | sh
wget -qO log_command.sh https://sh.devminer.xyz/log_command.sh
#!/usr/bin/env sh
FILE="$1"
shift
DATE="$(date --rfc-3339=seconds)"
echo "${DATE} ❯ $@" > "$FILE"
$@ | tee -a "$FILE"