<?php
$file = 'c:/Users/HP/Downloads/climate-system/temp_extract/climate-system/index.php';
if (!file_exists($file)) {
    die("File not found\n");
}
$content = file_get_contents($file);
$query = isset($argv[1]) ? $argv[1] : 'futureLocationTS';
$lines = explode("\n", $content);
$found = 0;
foreach ($lines as $idx => $line) {
    if (stripos($line, $query) !== false) {
        $found++;
        echo "Line " . ($idx + 1) . ": " . trim($line) . "\n";
    }
}
if ($found == 0) {
    echo "No matches found for '$query'\n";
}
