Which best defines the action of this script?

The following shell script is run by cron on a regular basis: x=$(find /home -name .rhost 2>/dev/null)
for i in $x; do
$y=$(echo $I | cut -d/ -f3);z=”$z $y”
rm $I;done
echo “Notice: $z” | mail [email protected]
Which best defines the action of this script?
A. Verify the existence of users’ .rhost files and removes the user.
B. Remove all .rhosts files and notify each user of your action.
C. Find all misplaced rhost files and remove them.
D. This script checks for the existence of .rhost files, deletes them and reports the offending user names to root.
E. Notify the root user of all .rhost files.

Download Printable PDF. VALID exam to help you PASS.

One thought on “Which best defines the action of this script?

  1. that should be a capital I in the for loop
    for I in $x; do

    linux, famously is sorta case sensitive….

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.