logo

Crowdly

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

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

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 user4 is:

0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на esiclass.esi.dz?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!