Skip to content

Instantly share code, notes, and snippets.

@levigroker
Last active August 14, 2024 22:21
Show Gist options
  • Save levigroker/36525010ba0bce15450c89fe6a5f36b1 to your computer and use it in GitHub Desktop.
Save levigroker/36525010ba0bce15450c89fe6a5f36b1 to your computer and use it in GitHub Desktop.
A BBEdit Text Filter script to take textual input and produce URL encoded text of the same.
#!/bin/bash
#
# URL Encode
# https://gist.github.com/levigroker/36525010ba0bce15450c89fe6a5f36b1
#
# A BBEdit Text Filter script to take textual input and produce URL encoded text of the same.
# See https://www.bbeditextras.org/text-filters/
# Levi Brown
# @levigroker
# [email protected]
# January 12, 2018
##
IN=$(tee)
CMD="echo urlencode('${IN}');"
OUT=$(php -r "$CMD")
echo -n "${OUT}"
@rcdncn
Copy link

rcdncn commented Aug 14, 2024

You may, like me, not realize that macOS 12.7 Monteray removes php from your system. Used brew to add it back. Here's how

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment