I have the following command whose output is shown below,is there a way to write an awk command to parse the current output and just print only the ones shown in the “expected output” field below?
ssh -p 29418 company.com gerrit query --commit-message --files --current-patch-set status:open project:platform/vendor/company/radio branch:master |grep refs
Current output:-
ref: refs/changes/26/206026/1
ref: refs/changes/25/206025/1
ref: refs/changes/22/206022/1
Desired output:-
206026
206025
206022
I know that you asked by
awkbut maybe you can try it withcut: