Skip to content

Instantly share code, notes, and snippets.

View abv1992's full-sized avatar
💭
I may be slow to respond.

abv1992

💭
I may be slow to respond.
View GitHub Profile
@cdown
cdown / gist:1163649
Last active September 25, 2024 14:24
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