Git: Set Upstream of a New Branch on First Push
29 April 2019
The first push of a new Git branch, when given as git push
will remind you to set the upstream.
$(git push 2>&1 | grep "git push")
Read : Git: Set Upstream of a New Branch on First Push
Docker: Delete Containers and Images Using GREP
20 April 2018
Here is a handy way of deleting Docker containers using GREP.
docker rm -f $(docker ps | grep <grep term> | awk ‘{print $1}’)
And here is a handy way of deleting Docker images using GREP.
docker rmi -f $(docker images | grep <grep term> | awk ‘{print $3}’)
Read : Docker: Delete Containers and Images Using GREP
GREP with a Negative Lookbehind
27 May 2016
This is a note on a simple regular expression to GREP for exceptions in a group of log files.
I have been debugging an issue unsure of what to look for. Of course 'Exception' on its own is not a great search term. Using a negative look-behind made the difference in trying to narrow down on what to look for. The look-behind made it possible to rule out the name of some of the exceptions that are not important to the issue at hand.
(?<!Faces|FileNotFound|Configuration)Exception
Read : GREP with a Negative Lookbehind