Last active
August 8, 2016 13:26
-
-
Save mcgaffin/af6af3ff064f06b1cedf2a67805069b6 to your computer and use it in GitHub Desktop.
Convert Cloudinary URLs to named transformations using sed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# sed script to convert dynamic transformations on Cloudinary to named transformations | |
# | |
# The tricky part was getting the backreference syntax correct. | |
sed -E \ | |
's/bookbub\/image\/upload\/.+h_([0-9]{3}).+\/v[0-9]*/kobubob\/image\/upload\/t_ci_email_201608_dynamic_\1/' \ | |
previews/default_deals_mobile_improvements/secondary_data/promotions.json | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment