Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mattpotts's full-sized avatar
🦒

Matthew Potts mattpotts

🦒
View GitHub Profile
@cdown
cdown / gist:1163649
Last active April 9, 2024 01:10
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in