I have a script that has as its output the following text:
vmhba0:0:0:1 104856224 96367264 8488960 91%
What I need is a way to isolate the number before the % (91% in this
example) and put some logic around that simply says 'if the number is
more than 90 do this else nothing'. I can handle the logic but having
a problem isolating the number. I've tried cut and it works except
that cut treats the spaces as actual spaces not tabs and that will
vary with the other numbers (for instance, I can do a vdf | grep
vmhba2:0:0:8 | cut -d" " -f19 and that will isolate the 59% but
another line will need the -f to be 18 or something else). If anyone
knows how to tell cut to use white space instead of actual spaces or a
way to always be consistent the problem is solved. I'm probably
looking right at the solution but getting a mental block.
Thanks in advance.