Cmd :"grep -o '"logURL":"[^"]*' "$file" | cut -d '"' -f4"
filters more then one logURL like below from feedConfig response log,
If both subs/pubs are present, which corrupts application config.
https://dmaap-dr-prov/feedlog/1
https://dmaap-dr-prov/sublog/1
Requirement is to filter only feedlog URL, with changes script
should correctly filter URL: https://dmaap-dr-prov/feedlog/1.
Issue-ID: DCAEGEN2-2910
Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech>
Change-Id: I2a67aad5c533f1b623737f56feeefb3a05f6373a
cd /opt/app/config/cache
for file in $(ls feed*); do
NUM=$(echo "$file" | sed 's/feedConfig-\([0-9]\+\)-resp.json/\1/')
- export DR_LOG_URL_"$NUM"="$(grep -o '"logURL":"[^"]*' "$file" | cut -d '"' -f4)"
+ export DR_LOG_URL_"$NUM"="$(grep -o '"logURL":"[^"]*' "$file" | grep -w "feedlog" | cut -d '"' -f4)"
export DR_FILES_PUBLISHER_URL_"$NUM"="$(grep -o '"publishURL":"[^"]*' "$file" | cut -d '"' -f4)"
done
for file in $(ls drpub*); do