- awk -i inplace '/location \/projects\/'"$location"'/,/}/ {if(/proxy_pass/) sub(/:[0-9]+.;/,":'"$port"';")} {print}' "$file"
+ awk -i inplace '/location \/projects\/'"$location"'/,/}/ {if(/proxy_pass/) sub(/:[0-9]+.;/,":'"$port"';")} {print}' $(ls $file)
./replace_location_port.sh -n who-am-i -v v2.50.6 -p 222 -f etc/nginx/locations/\*.locations