Answers for "bash set two variables at once"

3

bash set two variables at once

# Basic syntax:
read -r variable1 variable2 <<< $(bash command generating two outputs)
# Where:
#	- -r specifies that backslashes should not be handled differently

# Example usage:
read -r var1 var2 <<< $(echo "one two")
echo $var1
--> one
echo $var2
--> two
Posted by: Guest on June-26-2021

Code answers related to "bash set two variables at once"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language