fork download
  1. #!/bin/bash
  2. # your code goes here
  3.  
  4. python_stub() { # reproduces what your python command might output
  5. echo '0.111 0.222 0.333'
  6. }
  7.  
  8. whole_output="$(python_stub)"
  9. first_value="$(echo "$whole_output" | cut -d' ' -f1)"
  10. second_value="$(echo "$whole_output" | cut -d' ' -f2)"
  11. third_value="$(echo "$whole_output" | cut -d' ' -f3)"
  12.  
  13.  
  14. printf '<%s> <%s> <%s>' "$first_value" "$second_value" "$third_value"
Success #stdin #stdout 0.01s 5624KB
stdin
Standard input is empty
stdout
<0.111> <0.222> <0.333>