Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # mobile.events.data.microsoft.com
- # vortex.data.microsoft.com
- TELEMETRY_URLS="[^/]+\.data\.microsoft\.com"
- REPLACEMENT="s/${TELEMETRY_URLS}/0\.0\.0\.0/g"
- debug() {
- d1=`perl -MTime::HiRes=time -e 'printf "%.5f\n", time'`
- sed -i -E "${REPLACEMENT}" ${1}
- d2=`perl -MTime::HiRes=time -e 'printf "%.5f\n", time'`
- echo "found: ${1} ($( du -h ${1} | cut -f1 )) $( echo "($d2 - $d1) * 1000" | bc )ms"
- }
- export -f debug
- d1=`perl -MTime::HiRes=time -e 'printf "%.5f\n", time'`
- grep -rl --exclude-dir=.git -E "${TELEMETRY_URLS}" . | xargs -I {} bash -c 'debug "$@"' _ {}
- d2=`perl -MTime::HiRes=time -e 'printf "%.5f\n", time'`
- echo "undo_telemetry: $( echo "$d2 - $d1" | bc )s"
Advertisement
Add Comment
Please, Sign In to add comment