Skip to main content
3 of 3
already received in answer
αғsнιη
  • 41.9k
  • 17
  • 75
  • 117

Get two values from command output in a bash script

I have a bashscript, which executes a command and calculates a pair of values, which output can look like this.

a,b (10.0000000000, 10.0000000000) -> volt (2088133.7088034691, -222653.3238934391)

And in case of invalid parameters or errors the program can show different error-messages.

Is there a safe way to parse the two volt-values and store them in two variables in a bash script?

Matty
  • 67
  • 2
  • 7