#!/bin/bash # Templates to update templates=( "templates/page-trainer-dashboard.php" "templates/page-trainer-organizer-manage.php" "templates/page-trainer-organizers-list.php" "templates/page-trainer-profile-edit.php" "templates/page-trainer-profile-view.php" "templates/page-trainer-profile.php" "templates/page-trainer-venue-manage.php" ) # Header include code header_include=' ' for template in "${templates[@]}"; do if [ -f "$template" ]; then echo "Updating $template..." # Check if template already has the header include if grep -q "trainer-header.php" "$template"; then echo " Already has header include, skipping..." continue fi # Create temporary file temp_file=$(mktemp) # Process the file awk -v header="$header_include" ' /