From 817a3f24cf1887f70e20c15b27b588a3046d1412 Mon Sep 17 00:00:00 2001 From: "mp1846@student.uni-lj.si" Date: Thu, 11 Dec 2014 21:17:06 +0000 Subject: =?UTF-8?q?Pol=C5=BE=20daj=20prosim=20feedback,=20=C4=8De=20so=20t?= =?UTF-8?q?aski=20vredu=20oz.=20je=20to=20dovolj=20za=20tale=20assignment:?= =?UTF-8?q?=208.=2012.=202014:=20write=20an=20additional=204=20sub-tasks?= =?UTF-8?q?=20for=20lecture=2004:=20Mihec=20Podlesek=20(63090381),=20Matej?= =?UTF-8?q?=20Pe=C4=8Dnik=20(63120105)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@36 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/copy_rename_20_files_tail_env/task.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'kpov_judge/tasks') 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
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
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 = { -- cgit v1.2.1