Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleExample of a Windows Shell job passing variables
linenumberstrue
@rem create results
@set first_result=%RANDOM%
@set second_result=%RANDOM%

@rem pass results from a key/value pair that is appended to a temporary file provided by JS7
@echo firstResult=%first_result% >> %JS7_RETURN_VALUES%
@echo secondResult=%second_result% >> %JS7_RETURN_VALUES%
Code Block
languagebash
titleExample of a Windows PowerShell job passing variables
linenumberstrue
# create results
$firstResult=Get-Random
$secondResult=Get-Random

# pass results from a key/value pair that is appended to a temporary file provided by JS7
"firstResult=$first_result" | Out-File -File $env:JS7_RETURN_VALUES -Append -Encoding ASCII
"secondResult=$second_result" | Out-File -File $env:JS7_RETURN_VALUES -Append -Encoding ASCII


Second Job: Read Variables

...