Using printf to decode a string

suggest change
#!bin/bash
    
$ string='Question%20-%20%22how%20do%20I%20decode%20a%20percent%20encoded%20string%3F%22%0AAnswer%20%20%20-%20Use%20printf%20%3A)'
$ printf '%b\n' "${string//%/\\x}"

# the result
Question - "how do I decode a percent encoded string?"
Answer   - Use printf :)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents