I am trying to return certain column of an array
My array looks like this(with all these number of spaces in between):
Soft One server01 1156
Soft One server04 1172
Soft One server03 1137
Soft One server02 1184
I only need to read the value of last column(that is the number) and supply it for other commands.
$xaload = qfarm /load /continue /app "Soft One"
for ($i = 4; $i -lt $xaload.Length; $i++)
{
$line = ([string]$xaload[$i]).Split(',')[0];
$line.split()[0] #what number I should give in the square braces to get the last column value only?
#when I select 0 it returns the first word of each line which is "soft"
#when I select 1 it returns the second word which is"one"
}
Thanks in advance for attending.