Bài TH3 CT178 Nguyên lý hệ điều hành

5 4 0
Bài TH3 CT178  Nguyên lý hệ điều hành

Đang tải... (xem toàn văn)

Thông tin tài liệu

BaiTH03 Bài 1 Bài 1 Ví dụ 1 In %%bash touch rmif chmod 755 rmif touch a In %%shell rmif aaaa rmif a Ví dụ 2 In %%bash touch ispositive chmod 755 ispositive In %%bash ispositive 3 Ví.

Bài 1: Ví dụ 1: In [ ]: %%bash touch rmif chmod 755 rmif touch a In [ ]: %%shell /rmif aaaa /rmif a rm: cannot remove 'aaaa': No such file or directory a is deleted successfully! Out[ ]: Ví dụ 2: In [ ]: %%bash touch ispositive chmod 755 ispositive In [ ]: %%bash /ispositive 3 is positive number Ví dụ 3: In [ ]: %%bash touch is_positive_negative chmod 755 is_positive_negative In [ ]: %%bash /is_positive_negative /is_positive_negative -3 is positive -3 is negative Ví dụ 4: In [ ]: %%bash touch testfor chmod 755 testfor In [ ]: %%bash /testfor Ví dụ 5: In [ ]: %%bash touch for2 chmod 755 for2 In [ ]: %%bash /for2 Welcome Welcome Welcome Welcome Welcome times times times times times Ví dụ 6: In [ ]: %%bash touch nestedfor chmod 755 nestedfor In [ ]: %%bash i=1 while [ $i -le ] echo “Welcome $i times” i=`expr $i + 1`; done “Welcome “Welcome “Welcome “Welcome “Welcome times” times” times” times” times” Ví dụ 7: In [ ]: %%bash i=1 while [ $i -le ] echo "Welcome $i times" i=`expr $i + 1` done Welcome Welcome Welcome Welcome Welcome Ví dụ 8: In [ ]: times times times times times %%bash touch casetest chmod 755 casetest In [ ]: %%shell /casetest Please choose a number: 1: Fried Eggs 2: Salad 3: Noodle Thanks, you chose Fried Noodle Out[ ]: Bài 2: In [ ]: %%bash n=10 for (( i = ; i

Ngày đăng: 23/12/2022, 10:46

Tài liệu cùng người dùng

Tài liệu liên quan