write-output to a variable code example
Example 1: powershell print to console
Write-Output "test output"
Example 2: save output of command to variable bash
OUTPUT="$(ls -1)"
echo "${OUTPUT}"
MULTILINE=$(ls \
-1)
echo "${MULTILINE}"
Write-Output "test output"
OUTPUT="$(ls -1)"
echo "${OUTPUT}"
MULTILINE=$(ls \
-1)
echo "${MULTILINE}"