0

The following code :

read var
gsettings org.gnome.system.proxy.http port "'$var'"

for the input sat, 10, reads var as integer. and gives the error

can not parse as value of type 'i': '10'

How should I resolve this issue?

1
  • This doesn't really have as much to do with bash as gsettings and how it interprets literal arguments. Commented Dec 28, 2015 at 2:45

1 Answer 1

2

Drop the single quotes from the command line; the command expects the string it sees to be a number, and numbers don't start with a single quote.

read var
gsettings org.gnome.system.proxy.http port "$var"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.