Event Timeline
Comment Actions
Modified version of the script that works on the NFS primary servers (labstore100{4,5}.eqiad.wmnet)
find_wb_terms_tools.sh
#!/bin/bash function check_tool { if grep \ --quiet \ --no-messages \ --recursive \ --fixed-strings \ --binary-files=without-match \ --include='*.php' \ --include='*.sql' \ --include='*.py' \ --include='*.java' \ --include='*.pl' \ --include='*.bash' \ --include='*.sh' \ --include='*.c' \ --include='*.cxx' \ --include='*.cpp' \ --include='*.cc' \ --include='*.C' \ --include='*.c++' \ wb_terms \ "/srv/tools/shared/tools/project/$1/" then printf '%s\n' "$1" else status=$? case $status in 1) # no match return 0 ;; 2) printf >&2 'grep error while searching tool %s\n' "$1" return 2 ;; *) printf >&2 'unknown grep exit code while searching tool %s: %d\n' "$1" "$status" return $status ;; esac fi } if (($#)); then for tool; do check_tool "$tool"; done else for dir in /srv/tools/shared/tools/project/*; do tool=${dir##*/} check_tool "$tool" done fi