shell script output to log file and console code example
Example: output to log file bash
#!/bin/bash
echo "This logs to where I want, but using echo" > /var/log/mycustomlog
OR
#!/bin/bash
echo "I will just append to my custom log file" >> /var/log/customlog