Hi,
I know this is really simple, but its been a while since I've written anything in awk. Basically, I have a file that has the characters "gi=" followed by a number. These strings are in no particular column in the file hence I can't just tell the script to print a particular column. If someone could help me work out a script that finds any occurence of "gi=" and then print out the number that follows, that would be great.
This would be the input (bearing in mind that it could be in a different order elsewhere on the page):
/clone=WHE1132_C07_F14 /gb=CD452818 /gi=31367558
This is the output I'd like to get:
31367558
Thanks for any help.
Giovanni
I know this is really simple, but its been a while since I've written anything in awk. Basically, I have a file that has the characters "gi=" followed by a number. These strings are in no particular column in the file hence I can't just tell the script to print a particular column. If someone could help me work out a script that finds any occurence of "gi=" and then print out the number that follows, that would be great.
This would be the input (bearing in mind that it could be in a different order elsewhere on the page):
/clone=WHE1132_C07_F14 /gb=CD452818 /gi=31367558
This is the output I'd like to get:
31367558
Thanks for any help.
Giovanni