Skip to content

Instantly share code, notes, and snippets.

@kobachi
Created July 22, 2019 05:25
Show Gist options
  • Save kobachi/34f0d271c776f7c524ba4f297b94fdc2 to your computer and use it in GitHub Desktop.
Save kobachi/34f0d271c776f7c524ba4f297b94fdc2 to your computer and use it in GitHub Desktop.
function urlencode {
t=$(echo "$1" | nkf -WwMQ | sed 's/=$//g' | tr = % | tr -d '\n')
echo ${t//\%2F/\/}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment