Hi guys,
A part of my script involves checking for the md5sum of a file.
When I run the script, it displays me the output but I want the same output to be written to a log file aswell.
#!/bin/bash
LOG=/tmp/deploy.log
MD5SUM_ADP=`md5sum /opt/code/ADPWebApp.war | awk '{print $1}'`
echo "md5sum of /opt/code/ADPWebApp.war is $MD5SUM_ADP"
Execution of the code is:
md5sum of /opt/code/ADPWebApp.war is fb0c1baea6750e2fcab0d52722eb37c8
How can I send the same output to $LOG as well with minimum code alteration ?