>_ IzzyLab

Topic breakdown

Every process belongs to the user it runs on behalf of, and ps can select processes by owner with the -u flag — a classic move for figuring out "what's running under an account". The subtlety: by default ps prints a header line, and counting it makes the number off by one too high — the header is stripped with a separate flag. Counting lines is done by wc -l, receiving the output through a pipe |, and the final number is redirected to a file with >; only the number should remain in the file (alternatively the same count comes from pgrep -u).

What's checked

  1. the daemon-svc process count is written correctly

What it looks like