Skip to main content
1 of 2
mikeserv
  • 59.4k
  • 10
  • 122
  • 242

You don't have to cut by -character count. Instead, you can cut on a specified -delimiter.

grep '^<gc type="global"' <infile | cut -d\" -f4 

80 81 82 

That gets only the 4th "-delimited field on a line. And so that field can be as many characters - or digits if you prefer - as you like, so long as none of them are double-quotes.

mikeserv
  • 59.4k
  • 10
  • 122
  • 242