Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# Usage:
#
# ./redirects.sh dev marthastewart < sample.csv
while IFS=, read -r from to
do
wpcli @$1 onecms-srm add $from $to 301 --url=$2.$1.onecms.io
done
from to
/getting-pregnant/trying-to-conceive/tips/home-pregnancy-tests/ https://www.parents.com/pregnancy/signs/test/home-pregnancy-tests/
/parenting/relationships/sex-and-marriage-after-baby/ways-to-feel-sexy-during-after-pregnancy/ https://www.parents.com/fun/printables/coloring-pages/ways-to-feel-sexy-during-after-pregnancy/
/parenting/relationships/sex-and-marriage-after-baby/how-long-before-resuming-postpartum-sex/ https://www.parents.com/fun/printables/coloring-pages/how-long-before-resuming-postpartum-sex/
/parenting/relationships/sex-and-marriage-after-baby/sex-after-cesarean-section/ https://www.parents.com/fun/printables/coloring-pages/sex-after-cesarean-section/
/baby/development/separation-anxiety/separation-anxiety-daycare-goodbyes/ https://www.parents.com/baby/nursery/furniture/separation-anxiety-daycare-goodbyes/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.