I am working on a wit.ai project and I want the user to be able to type a query/request in plain human readable text (e.g "Turn on the lights") and the program will convert it to a formatted version designed to be put in a curl
request (e.g "Turn%20on%20the%20lights").
How would I for example turn "Stack Exchange" into "Stack%20Exchange" using tools in bash?