find.sh 567 B

12345678910111213141516
  1. #!/bin/bash
  2. # Find text from all subdirectories
  3. # and ignore all temporary directories:
  4. # - node-modules = installed node modules
  5. # - .build = Wekan bundle that is combined from source. Do not edit these, these are deleted and recreated.
  6. # - .meteor = Meteor version, packages etc at .meteor/local
  7. # - .git = git history
  8. # If less or more that 1 parameter, show usage.
  9. if (( $# != 1 )); then
  10. echo 'Usage: ./find.sh text-to-find'
  11. exit 0
  12. fi
  13. find . | grep -v node_modules | grep -v .build | grep -v .meteor | grep -v .git | xargs grep --no-messages $1 | less