logo

Crowdly

Analyze the following scenario and answer the questions. user1@PC:~$ ls   -F   /...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Analyze the following scenario and answer the questions.

user1@PC:~$ ls   -F   /home/user*

/home/user1:

 file  'Free palestine'   Palestine/   script2   Videos/

/home/user2:

Free/  palestine/  Palestine

/home/user3:

'Free palestine'

/home/user4:

'Free palestine'   Palestine/

user1@PC:~$ cat -n Free\ palestine 

     1

     2 Free palestine

user1@PC:~$ cat  -n   /home/user3/Free\ palestine 

user1@PC:~$ cat  -n   /home/user4/Free\ palestine 

     1 Free palestine

user1@PC:~$ cat script2

for i in `seq 1 4`

do

note=0

Usr="user$i"

obj1="/home/$Usr/Desktop/`whoami`/Palestine"

obj2="/home/$Usr/Desktop/`whoami`/Free palestine"

if [  -d  "$obj1"  ]

then

let note=$note+1

fi

if [  -f  "$obj2"  ]

then

let note=$note+1

l=`grep -n   ^"Free palestine"    "$obj2"   | cut   -d":"  -f1` 

if [  "$l"  =  "2"  ]

then

let note=$note+1

fi

fi

echo "The grade of $Usr is ${note}/3"

done

Question:

Select the correct result after executing script 2. The grade of user1 is:

More questions like this

Want instant access to all verified answers on esiclass.esi.dz?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!