I have text file separated by space (C:\test.txt), all values in row1 are unique:
Test1 100
Test2 200
Test3 300
next create array:
$arr = @(get-content "C:\test.txt)
how can I find value from row1 = Test2, display value from row2 (200) next check if that value is greater than $variable1 if yes change that value to 200+100 and write that to array and next to file c:\test.txt ?
$variable1 = 150
array and test.txt should be when script ended:
Test1 100
Test2 300
Test3 300