I have a file with lines such as:
27/12/20 | 05:50:48pm | abcdefgh |ID:1:418856791 | jack | 18.104.22.168:1111 | IN | GN-4536 | LOL | 0 27/12/20 | 05:51:44pm | abcdefgh |ID:1:503729784 | jill | 22.214.171.124:2222 | IN | GN-497187 | LOL2 | 0
There is a big file with such lines. How can I extract only
GN-497187 from this file? Like it can be anything
GN<-numbers>. How can I get the output in format like:
GN-number GN-number GN-number GN-number
I tried using
grep commands but It could extract the number.