Basically, I'm trying to make a program that at one point needs to store coordinates. There is one part of the program where I need to separate one string into two so I an able to preform math on the two strings separately, then reattach the two strings. An example of how strings would need to be changed in a kind of pseudocode:
Var1="10 17" separate Var1 into Var2 and Var3 #using the command echo "$Var1,Var2,Var3" here would output 10 17,10,17 #preform math on Var2 and/or Var3 here Var1="$Var2 $Var3"
Part of the problem is that I can't just do
or whatever the equivalent is for removing the first characters to remove the first or last two digits because these numbers could sometimes be more than 99 or less than 10. Note that I would like for the separator between the two numbers to be a space. Does anybody know how I could do this?