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)
Here's how to list files in the current directory that don't contain "asdf" (case-insensitive) in their contents:
1 2 3 4 5 | for file in *; do if [[ -f "$file" ]] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
1 | for file in *; do [[ -f "$file" ]] && ! grep -qi "asdf" "$file" && echo "$file"; done |
I extracted the following code from that output:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [[ -f "$file" ]] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
Running the following program:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [[ -f "$file" ]] && ! grep -qi "asdf" "$file"; then echo "$file" 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
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)
Here's how to list files in the current working directory that don't contain "asdf" (case-insensitive) in their contents:
1 2 3 4 5 | for file in *; do if [ -f "$file" ] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
1 | for file in *; do [ -f "$file" ] && ! grep -qi "asdf" "$file" && echo "$file"; done |
I extracted the following code from that output:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [ -f "$file" ] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
Running the following program:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [ -f "$file" ] && ! grep -qi "asdf" "$file"; then echo "$file" 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
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)
Here's how to list files in the current working directory that don't contain "asdf" (case-insensitive) in their contents:
1 2 3 4 5 | for file in *; do if [ -f "$file" ] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
1 | for file in *; do [ -f "$file" ] && ! grep -qi "asdf" "$file" && echo "$file"; done |
I extracted the following code from that output:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [ -f "$file" ] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
Running the following program:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [ -f "$file" ] && ! grep -qi "asdf" "$file"; then echo "$file" 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
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)
Here's how to list files in the current working directory that don't contain "asdf" (case-insensitive) in their contents:
1 2 3 4 5 | for file in *; do if [[ -f "$file" ]] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
1 | for file in *; do [[ -f "$file" ]] && ! grep -qi "asdf" "$file" && echo "$file"; done |
I extracted the following code from that output:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [[ -f "$file" ]] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
Running the following program:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [[ -f "$file" ]] && ! grep -qi "asdf" "$file"; then echo "$file" 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
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)
Here's how to list files in the current working directory that don't contain "asdf" (case-insensitive) in their contents:
1 2 3 4 5 | for file in *; do if [ -f "$file" ] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
1 | find . -type f -maxdepth 1 ! -exec grep -qi "asdf" {} \; -print |
I extracted the following code from that output:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [ -f "$file" ] && ! grep -qi "asdf" "$file"; then echo "$file" fi done |
Running the following program:
1 2 3 4 5 6 7 | #!/bin/bash for file in *; do if [ -f "$file" ] && ! grep -qi "asdf" "$file"; then echo "$file" 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