oplaTech About Teaching Archive
Oplatek's external memory

Week 9, Intro to Unix lab 2016

Content

  • Recap of processes subshells {}
    • { rm a || rm b ; } || echo failed subshell
  • basic signalling. See kill -l and previous week 8 for homework.
  • counter=0; seq 10 | { counter=$(wc -l); echo $counter ; } ; echo parent process counter $counter
  • ps for printing resources
    • ps -a -x -o pid,rss | tail -n +2
  • We look at some common errors
    • http://j2m.cz/~jm/vyuka/unix2016/priklady10.sh
    • http://ufal.mff.cuni.cz/~vernerova/2016/docs/cviceni08.txt
    • In general try to look also to another lab exercise

Homework

  • In addition to homework from previous week which was announced this Thursday
  • (1 point) Implement a script which will run forever if not interrupted via Ctrl + C
    • If interrupted it will ask you: Do you really want to quit? y/N
    • If only enter is pressed it continues
    • If y or Y is pressed then it quits
    • If n or N is pressed then it continues