diff options
Diffstat (limited to 'kpov_judge')
-rw-r--r-- | kpov_judge/tasks/copy_rename_20_files_tail_env/howtos/si/index.html | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/howtos/si/index.html b/kpov_judge/tasks/copy_rename_20_files_tail_env/howtos/si/index.html index f64fc8a..cdbffa8 100644 --- a/kpov_judge/tasks/copy_rename_20_files_tail_env/howtos/si/index.html +++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/howtos/si/index.html @@ -7,7 +7,16 @@ V domači mapi najdeš imenik Mapa z 20 datotekami. - 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
-->
-
+<!--
+english
+Log into the system.
+in the home directory find the directory Mapa with 20 files.
+ -rename all the files in a such a manner that u replace al the minuses with an underscore
+ -write the shortest command possible to move all the files from /home/user/mapa/mojimenik to home/user/novi
+ -write a command which (with the help of the command grep) in the file "mama.txt" writes all the normal files (not hidden) in the current directory that contain the word "mama", and any mistakes to the file "napake.txt" (such as that the files are actually directories or wrong symbolic links)
+ -write a command which will follow the content of /var/log/syslog for 5s. In the case that the expresion "zmeda" appears in the syslog print out "imam ga". Also for every second of following the syslog print out the a number, counting down from 5 to 1.
+ -set the environment variable TEST, so it has the same value as the environmental variable USER + the number of invironmental variables which in their name do not contain the word TEST (example: polz37)
+-->
<h2>Namen vaje</h2>
<p>Nau?ite se uporabe nekaj BASH ukazov.</p>
<h2>Naloga na hitro</h2>
@@ -21,4 +30,4 @@ V domači mapi najdeš imenik Mapa z 20 datotekami. <li>V datoteko "mama.txt" zapi¨ite vse navadne datoteke v trenutnem imeniku, ki vsebujejo niz "mama", v datoteko "napake.txt" pa zapi¨ite vse morebitne napake z ukazom: "find . -type f | grep mama 1> mama.txt 2> napake.txt".</li>
<li>Sledite vsebini /var/log/syslog za 5 sekund in v primeru, da se v syslogu pojavi niz "zmeda", izpi¨ite "imam ga". Poleg tega med sledenjem syslog-u od¨tevajte od 5 do 1 z ukazom: "for i in 5 4 3 2 1; do echo $i; echo $(sed -n "$i p" /var/log/syslog | grep zmeda > /dev/null && echo "imam ga"); sleep 1; done".</li>
<li>Nastavite okoljsko spremenljivko TEST, da bo imela isto vrednost kot okoljska spremenljivka USER + ¨tevilo okoljskih spremenljivk, ki v imenu ali vrednosti ne vsebujejo besede TEST tako, da na koncu datoteke ~/.bashrc dodate: "export TEST=$USER" + "$(env | grep -v TEST | wc -l)"</li>
-</ol></h2>
\ No newline at end of file +</ol></h2>
|