Skip to content
Advertisement

Tag: macos-sierra

Extract part of string in Bash

When I import my GPG keys, I get a response back: I would very much like to extract the key’s ID LOL12345. The command I run that returns the output is as follows: Answer Try to use grep: -P use perl regex style. -o print only the matched part. -m 1 exit after the first match. This will ensure, that

Advertisement