Wednesday, June 24, 2015

Calculating Processing Time in Linux Shell File

#!/bin/bash
START=$(date +%s)
# do something
# start your script work here

ls -R /etc > /tmp/x
rm -f /tmp/x
# your logic ends here
END=$(date +%s)
DIFF=$(( $END - $START ))
echo "It took $DIFF seconds"

No comments:

Post a Comment

Setting Jupyter and Tensorflow on Google Cloud Platform

https://towardsdatascience.com/running-jupyter-notebook-in-google-cloud-platform-in-15-min-61e16da34d52