Created
November 3, 2017 20:12
-
-
Save atheiman/14b94724c7d02c7ac8e953efa462e2d2 to your computer and use it in GitHub Desktop.
echo_and_run simple shell function to print timestamp and command then execute the command (useful in build tools that dont log well)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo_and_run() { echo "$(date +%T) $*"; $*; } | |
$ echo_and_run ls | |
# 15:09:35 ls | |
# Gemfile Gemfile.lock README.md spec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment