Skip to content

Instantly share code, notes, and snippets.

@alex-pat
Created December 20, 2016 22:28
Show Gist options
  • Save alex-pat/ec0c217ab3c11b891260629e59dc7700 to your computer and use it in GitHub Desktop.
Save alex-pat/ec0c217ab3c11b891260629e59dc7700 to your computer and use it in GitHub Desktop.
статы по токсу
# Сколько вопросов в каждом файле
$ for i in *.txt; do echo " $(grep -c "Q:" "$i") tests in $i"; done
46 tests in ATM, ISDN, Frame Relay, FDDI.txt
67 tests in common.txt
23 tests in Ethernet.txt
24 tests in ISO HDLC&X.25.txt
19 tests in ISO high&transp.txt
29 tests in OSI_ISO model.txt
21 tests in stack-ipx_spx.txt
119 tests in stack-tcp_ip.txt
29 tests in Token Ring&Bus&100VG.txt
16 tests in Маршрутизация&Адресация.txt
55 tests in параллельная обработка информации.txt
28 tests in сетевое_оборудование.txt
21 tests in системы управления сетями.txt
46 tests in Физические характеристики,MAC,LLC.txt
# Сколько всего вопросов
$ find . -name '*.txt' -print0 | xargs -0 grep -c "Q:" | awk -F ':' 'BEGIN {s=0}; {sum+=$2} END {print sum}'
543
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment