invalid argument in bash script when port is bad
- by user273689
When I do this command I get an error when there is something wrong with the eth3.
RESC="1234"
RESD="1234"
RESO="1234"
RESC=$(ssh -q vmx@$1 cat /sys/class/net/$2/carrier)
RESO=$(ssh -q vmx@$1 cat /sys/class/net/$2/operstate)
RESD=$(ssh -q vmx@$1 cat /sys/class/net/$2/dormant)
cat: /sys/class/net/eth3/carrier: Invalid argument
cat: /sys/class/net/eth3/dormant: Invalid argument
How can I use the invalid argument inside the RESC and RESD variable
Thanks