...

/

Exercise: If Statement

Exercise: If Statement

Put to practice what you have learned about if statements.

We'll cover the following...

Exercise

Below is a Bash command:

( grep -RlZ "bash" target | xargs -0 cp -t . && echo "cp - OK" || ! echo "cp - FAILS" ) && ( grep -RLZ "bash" target | xargs -0 rm && echo "rm - OK" || echo "rm - FAILS" )

It looks for the string “bash” in the files of the directory named target ...