| 12345678910111213 |
- #!/bin/bash -e
- find . -type f -name "*.html" | while read -r file; do
- # Remove <script> tags and their content independently, across multiple lines, and case-insensitively
- perl -0777 -pi -e 's/<script\b[^>]*?>.*?<\/script>//gsi' "$file"
- # Replace all instances of 'http://sophira.i8.com/' with '/'
- perl -pi -e 's|http://sophira\.i8\.com/|/|g' "$file"
- # Remove all content between the banner comments, inclusive
- perl -0777 -pi -e 's/<!-- Auto Banner Insertion Begin -->.*?<!-- Auto Banner Insertion Complete THANK YOU -->//gsi' "$file"
- done
|