Created
September 29, 2015 19:29
-
-
Save andyscott/eacc796d90ed6c0e31c5 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# find path to most recently updated simulator log | |
LOG_PATH=`find ~/Library/Logs/CoreSimulator/*/system.log -type f -print0 | xargs -0 stat -f "%m %N" | | |
sort -rn | head -1 | cut -f2- -d" "` | |
green=`tput setaf 2` | |
reset=`tput sgr0` | |
# formatter | |
FORMAT () { | |
while read data; do | |
echo $data | sed "s/.*'\(.*\)'$/${green}>${reset} \1/g" | |
done | |
} | |
# tail -> format | |
tail -f $LOG_PATH | FORMAT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment