I am trying to store output of command to variable in below bash script but the output is displayed on screen instead of storing in the variable
#!/bin/bash
check=$(ip link show dev mylink)
echo "$check"
I am trying to store output of command to variable in below bash script but the output is displayed on screen instead of storing in the variable
#!/bin/bash
check=$(ip link show dev mylink)
echo "$check"