Skip to content

Conversation

@Luc1et
Copy link
Collaborator

@Luc1et Luc1et commented Nov 5, 2025

Finální verze úkolu č. 1: Git

  • vypracovány i teoretické otázky
  • přejmenován soubor s logem, který už jsem měla odevzdaný

Finální verze úkolu č. 2: Bash I

Finální verze úkolu č. 3: Správa uživatelů

@Luc1et Luc1et changed the title úkoly 1: Git úkoly 1: Git, 2: Bash I Nov 5, 2025
@Luc1et Luc1et changed the title úkoly 1: Git, 2: Bash I úkoly 1: Git, 2: Bash I, 3: Správa uživatelů Nov 5, 2025
Copy link
Contributor

@ejegrova ejegrova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zkontrolovány zatím úkoly 3a a 3b 👍

Copy link
Contributor

@ejegrova ejegrova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zkontrolován úkol 2.

Comment on lines +17 to +30
## 2.

Začnu-li (jako uživatel `mh`) v adresáři `/home/mh/data`, které z těchto příkazů mě dostanou do `/home/mh`?

* **A.** `cd .`
* **B.** `cd /`
* **C.** `cd /home/mh` ..... SPRÁVNÁ ODPOVĚĎ
* **D.** `cd ../..`
* **E.** `cd ~`............. SPRÁVNÁ ODPOVĚĎ
* **F.** `cd home`
* **G.** `cd ~/data/..` .... SPRÁVNÁ ODPOVĚĎ
* **H.** `cd` .............. SPRÁVNÁ ODPOVĚĎ
* **I.** `cd ..` ........... SPRÁVNÁ ODPOVĚĎ
* **J.** otevření nového terminálu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J. je taky správná odpověď, pokud nemáš bash nějak přenastavený, aby dělal něco jiného.

Comment on lines +94 to +96
3. Pusť `ls -l`. Zjistíš z výpisu, co nový soubor obsahuje?

Ne.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zjistíš že je prázdný a tedy neobsahuje nic :)

Copy link
Contributor

@ejegrova ejegrova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zkontrolován úkol 1a a 1b 👍

Copy link
Contributor

@ejegrova ejegrova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zkontrolován úkol 4 - bash II

Comment on lines +50 to +59
3. Z kolika přednášek na Pyvech jsou videa? *(Předpokládej že každá přednáška může mít max. 1 video)*
* *Videa jsou označena `video:`*
---
🟢 **Odpověď:**

cd pyvo-data-master/series
grep -e '-video' */events/20*.yaml | wc -l

438
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tady popravdě nevím, jak ti to mohlo fungovat? Používáš fedoru?
grep -e '-video' */events/20*.yaml | wc -l mi nic nevypisuje, ale v případě že odeberu pomlučku z výrazu video, pak funguje (žádný výraz -video se v souborech nevyskytuje):
grep -e "video" */events/20*.yaml | wc -l

Jinak doporučují použít přepínač -w, který bere jen celá slova. S přepínačem -e se nám objeví ve výpisu i další texty, které nechceme. Např.:
praha-pyvo/events/2019-02-20-machine-learning.yaml: Z akce bude [živý videopřenos](https://www.youtube.com/watch?v=1fPS75CYHVo); trpíte-li tedy například nachlazením, trpte v klidu doma a dívejte se na stream.

Comment on lines +111 to +116
6. Vypiš všechna místa konání Pyv (stačí mít v rámci každého řádku identifikátor jako `artbar`).
---
🟢 **Odpověď:**

cd pyvo-data-master/series
grep -h -o 'venue:[[:space:]]*.*' */events/20*.yaml | sort | uniq | grep -o '[^[:space:]]*$'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tady oceňuji řešení, žes získala opravdu jen název místa konání 👍
Jen pro doplnění, stačilo mít odpověď jednodušší formou sort ~/pyvo-data-master/series/*/events/* | uniq | grep venue

🟢 **Odpověď:**

cd pyladies.cz-master/teams
cat *.yml | grep -- "- name:" |cut -d' ' -f3 | sort | uniq -c | sort -n -r | head -n3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hezký řešení, jen začátek by se dal trošku zjednodušit:
cat *.yml | grep -- "- name:"
na
grep -h name\: ./*

$ cp *dataset* backup/datasets
$ cp *calibration* backup/calibration
$ cp 2015-11-* send_to_bob/all_november_files/
$ cp 2015-*-23* send_to_bob/all_datasets_created_on_a_23rd/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tento příkaz by nám zkopíroval i soubor 2015-11-23-calibration.txt. Chtěli bychom přesunout jen datasety,

Copy link
Contributor

@ejegrova ejegrova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Úkol 5 je těžko čtelný. Soubor podzim_2025/lucie-talasova/LT-ukoly5a-procesy_signaly-vsechny_ps.txt vypadá správně, ale nás spíš zajímá cesta jakými příkazy se k tomu dostaneš. Soubor s logem není úplně ideální, jak posílat výstup.

@ejegrova ejegrova added student and removed teacher labels Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants