Skip to content

Instantly share code, notes, and snippets.

@simbalinux
Last active July 13, 2018 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simbalinux/d391384a600e42722540ddde90e13320 to your computer and use it in GitHub Desktop.
Save simbalinux/d391384a600e42722540ddde90e13320 to your computer and use it in GitHub Desktop.
find and replace all occurences of " ." IF gt 3 and replace with "+"
[ $(grep -o '\.' file|wc -l) -gt 3 ] && sed -i file -e 's/\./+/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment