summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks/copy_rename_20_files_tail_env/task.py')
-rw-r--r--kpov_judge/tasks/copy_rename_20_files_tail_env/task.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
index de66564..2660ff5 100644
--- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
+++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
@@ -12,6 +12,10 @@ V domači mapi najdeš imenik Mapa z 20 datotekami.
- Napiši ukaz, ki s pomočjo ukaza grep v datoteko "mama.txt" izpiše vse navade (ne skrite) datoteke v trenutnem imeniku, ki vsebujejo niz "mama", v datoteko "napake.txt" pa izpiše vse morebitne napake (npr. to, da so nekateri objekti v trenutnem imeniku dejansko imeniki ali napačne simbolične povezave)
- Napiši ukaz, ki bo 5s sledil vsebini /var/log/syslog. V primeru, da se v syslogu pojavi niz "zmeda", naj program izpiše "imam ga". Poleg tega naj program med sledenjem syslog-u odšteva od 5 do 1 (vsako sekundo naj se izpiše naslednja številka.
- Nastavi okoljsko spremenljivko TEST, da bo imela isto vrednost kot okoljska spremenljivka USER + število okoljskih spremenljivk, ki v imenu ali vrednosti ne vsebujejo besede TEST. Primer: polz37
+ - S pomočjo programa cURL shrani vsebino spletne strani www.google.com v datoteko z imenom website.txt
+ - Napiši ukaz, ki bo število pojavitev značke <div> v datoteki website.txt dodal na konec te iste datoteke brez, da bi se ukaz zapisal v zgodovino ukazov "bash history"
+ - Napiši ukaz brez uporabe programa cron, kateri 5 minut po izvedbi izpiše vsebino imenika v katerem se trenutno nahajaš
+ - Napiši nakrajši ukaz, ki s pomočjo Pythona zažene preprost (integriran) HTTP strežnik kateri streže datoteke iz imenika iz katerega je bil pognan na vratih 8000
"""
}
@@ -31,7 +35,11 @@ In addition, let the program subtrack 1 from the counter every
second(5 to 1) to show the status of the tracker.
- Set the variable TEST, which will have the same value as the
variable USER + the number of variables that do not include the name
-TEST, for example polz37.
+TEST, for example polz37.
+- With the help of cURL fetch the website content of www.google.com and save it into file named website.txt
+- Write a command which will count the number of <div> tags in the filename website.txt and will then append the result to this same file. Command should not be logged in "bash history"!
+- Write a command (don't use cron!) which will list all the files in the current directory 5 minutes after execution
+- Write shortest command possible which will with the help of Python start a simple (integrated) HTTP server and will serve the files from the current directory on port 8000.
}
computers = {