I have setup the docker container to run the model evaluation.
In bash list all files in cwd that don't contain asdf in the contents (case-ignore)
In bash list all files in cwd that don't contain asdf in the contents (case-ignore)
You can use the `grep` command in combination with `find` to achieve this. Here's how you can do it:
1 | find . -maxdepth 1 -type f -exec grep -qi asdf {} \; -print | grep -v |
1 | find . -maxdepth 1 -type f -print0 | xargs -0 grep -qi -v asdf |
1 2 3 4 5 6 7 | for file in *; do if [ -f "$file" ]; then if ! grep -qi asdf "$file" > /dev/null; then echo "$file" fi fi done |
I extracted the following code from that output:
1 2 3 4 5 6 7 8 9 10 11 12 | #!/bin/bash find . -maxdepth 1 -type f -print0 | xargs -0 grep -qi -v asdf # Alternatively, you can use a bash loop: for file in *; do if [ -f "$file" ]; then if ! grep -qi asdf "$file" > /dev/null; then echo "$file" fi fi done |
Running the following program:
1 2 3 4 5 6 7 8 9 10 11 12 | #!/bin/bash find . -maxdepth 1 -type f -print0 | xargs -0 grep -qi -v asdf # Alternatively, you can use a bash loop: for file in *; do if [ -f "$file" ]; then if ! grep -qi asdf "$file" > /dev/null; then echo "$file" fi fi done |
asdf
hello
this
Testing if the previous output contains the string lower
: False
Testing if the previous output contains the string asdf
: True
Testing if the previous output contains the string this
: True
Testing if the previous output contains the string there
: False
Testing if the previous output contains the string hello
: True