fork download
  1. #!/bin/bash
  2. s='<jnlp codebase="https://c...content-available-to-author-only...e.com/computer/jnlpAgentTest/" spec="1.0+">
  3. <information>
  4. <title>Agent for jnlpAgentTest</title>
  5. <vendor>Jenkins project</vendor>
  6. <homepage href="https://j...content-available-to-author-only...i.org/"/>
  7. </information>
  8. <security>
  9. <all-permissions/>
  10. </security>
  11. <resources>
  12. <j2se version="1.8+"/>
  13. <jar href="https://c...content-available-to-author-only...e.com/jnlpJars/remoting.jar"/>
  14. </resources>
  15. <application-desc main-class="hudson.remoting.jnlp.Main">
  16. <argument>b8c80148ce36de10c9358384fac9e28fbba941055a9a6ab2277e75ddc29a8744</argument>
  17. <argument>jnlpAgentTest</argument>
  18. <argument>-workDir</argument>
  19. <argument>/tmp/jnlpAgenttest</argument>
  20. <argument>-internalDir</argument>
  21. <argument>remoting</argument>
  22. <argument>-url</argument>
  23. <argument>https://c...content-available-to-author-only...e.com/</argument>
  24. </application-desc>
  25. </jnlp>'
  26. sed -n -e '/-workDir/{n' -e 's/.*>\([^<>]*\)<.*/\1/p' -e '}' <<< "$s"
  27. sed -n '/-workDir/{n;s/.*>\([^<>]*\)<.*/\1/p}' <<< "$s"
Success #stdin #stdout 0.01s 5652KB
stdin
Standard input is empty
stdout
/tmp/jnlpAgenttest
/tmp/jnlpAgenttest