I need something like "grep", but instead of showing just the matches, it actually outputs everything, but the exit status points if the match appeared or not.
What I'm trying to do: Only when docker pull
shows that the image was updated, I need to do a prune
to remove the older images.
I could do that all the time, but I feel it is a waste to do so when the image didn't change and the current image is not dangling.
@juliobiason grep -l for the exit status, then cat the listed files ?