Execute command with specified argument(s) and save its output to log file

logsave

logsave {{path/to/logfile}} {{command}}

click the source code to copy install logsave on any operating system with command-not-found.com