Created
March 11, 2022 17:04
-
-
Save alexjyong/dab65a4c8920fe3f2485aefbf832285c to your computer and use it in GitHub Desktop.
perl oneliner to filter CLI output
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
perl -wnE'say /<add a regex here>/g' | |
example: docker inspect --format='{{index .RepoDigests 0}}' superCoolTag | perl -wnE'say /sha256.*/g' | |
this would output only the sha256 of the image. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment