Created
October 6, 2020 07:19
-
-
Save PierreTurnbull/b63557ee5817d3836fe23605dce56b71 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
# display filtered logs from a Docker container | |
function dcl () { | |
# display logs | |
docker logs $(docker ps | grep $1 | head -c 12) | | |
# filter by keyword (ex: clientId) | |
if [ -z "$2" ] | |
then | |
cat | |
else | |
cat | grep "$2" | |
fi; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment