Quicksort timing code mentioned in the lab system command: Used this for the last lab, this one too But what if we want the output? Python's getoutput function Can we make something like it in C? Yes, but it's going to be "interesting" Did you talk about heap allocation in C++ yet? Not in my CS211 "Just" use a pipe and a file descriptor Piece of cake, right! May as well - why not? Create a pipeline tool that replaces newlines Or, replaces a particular symbol with newlines You can do this stuff with awk, but we'll make our own tool Kind of like sed Quick sed intro, again But it only looks for newlines Command-line options: -r: remove, don't replace newlines, just remove them -b: backwards, replace pattern with newline instead of newline with pattern Once it works: --help option Another example: Add up all the numbers in an input stream (stream_adder) Adding an argument to set the operator Calculate total bogomips using it Calculate the number of interrupts handled by each processor