Currently I am having extreme difficulties when putting the output of a command into a variable. I just have no idea what I am doing wrong.
#! /bin/bash
on = $(nmcli networking connectivity)
echo "$on"
if [ "$on" = "full" ]
then
nmcli networking off
else
nmcli networking on
fi
edit: when I run this file I get nothing from the echo so I am assuming it is something going wrong with the outputing of the on variable.