Skip to content

Instantly share code, notes, and snippets.

@rpromyshlennikov
Created February 17, 2021 19:56
Show Gist options
  • Save rpromyshlennikov/96a16dd4b7e79a40feb77232412a7eb9 to your computer and use it in GitHub Desktop.
Save rpromyshlennikov/96a16dd4b7e79a40feb77232412a7eb9 to your computer and use it in GitHub Desktop.
Replace GOROOT in all GoLand projects in directory
find ~/work/go/ \( -name 'workspace.xml' -o -name 'misc.xml' \) -type f | xargs grep GOROOT | cut -d':' -f 1 | grep -v old_repos | xargs sed -e 's/go1.\([0-9]\+\).\([0-9]\+\)/go1.15.7/g' | grep GOROOT
find ~/work/go/ \( -name 'workspace.xml' -o -name 'misc.xml' \) -type f | xargs grep GOROOT | cut -d':' -f 1 | grep -v old_repos | xargs sed -i -e 's/go1.\([0-9]\+\).\([0-9]\+\)/go1.15.7/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment