fork download
  1. #!/bin/bash
  2. s='<h1>JVM</h1><p>Free Memory:2144.78 MB Total Memory:3072.00 MB Max Memory:3072.00 MB</p><table border="0">'
  3. fm=$(sed -n 's/.*Free Memory:\([^ ]*\).*/\1/p' <<< "$s")
  4. tm=$(sed -n 's/.*Total Memory:\([^ ]*\).*/\1/p' <<< "$s")
  5. mm=$(sed -n 's/.*Max Memory:\([^ ]*\).*/\1/p' <<< "$s")
  6. echo "fm=$fm, tm=$tm, mm=$mm"
Success #stdin #stdout 0.01s 5492KB
stdin
Standard input is empty
stdout
fm=2144.78, tm=3072.00, mm=3072.00