Reputation: 2737
I am a novice at shell scripting. I want to store the result of whether screen lock is enabled or not. Here's my script (with something wrong in it):
now=$(gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false')
When I echo
, I get no value stored in the variable now
.
echo $now
(gives nothing)
Upvotes: 1
Views: 2167
Reputation: 8287
In your command, you are not reading, you are setting :)
try this:
now=$(gsettings get org.gnome.desktop.lockdown disable-lock-screen)
I am not sure why are you checking the result of set
ting the value. Is it a mistake or you intend to do it?
Upvotes: 8