tcookwhatveg - recipes - various cooking recipes
 (HTM) git clone git://src.adamsgaard.dk/recipes
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
       ---
       tcookwhatveg (355B)
       ---
            1 #!/bin/sh
            2 # Pass a series of ingredients as arguments to this script, and it
            3 # will print all files that contain them.
            4 cmd="find . -iname '*.md' -type f"
            5 i=0
            6 for a in "$@"; do
            7         i=$((i + 1))
            8         cmd="${cmd} -exec grep -qiE '^- .*${a}' {} \;"
            9 done
           10 eval "$cmd -exec grep -iLE '(meat|pork|beef|chicken|fish|tuna|salmon|duck|shrimp|bacon)' {} \; | sed 's,^./,,'"