6 Matching Annotations
  1. Last 7 days
    1. sed appears to be able to do this much more efficiently if a large number of files are involved. awk may be easier to remember, but sed seems to be worth a sticky note in my brain.
  2. Mar 2021
    1. awk is my weapon of choice when it comes to text processing. Besides, it's syntax is close to C
    2. $(awk -F= '/^Exec/||/^TryExec/ {print $2;exit}' /usr/share/applications/firefox.desktop)
  3. Feb 2021
    1. To get all the processes spawned by a process the whole tree needs to be built. I used awk for that. At first it builds a hash array to contain all PID => ,child,child... . At the end it calls a recursive function to extract all the child processes of a given process. The result is passed to another ps to format the result.
  4. Oct 2018
  5. Jun 2017