This is a project supposed to be in C, that is literally just this: tr ' ' '\n' < test.txt | sed '/^$/d' | sort -u     but I wasn't allowed to just call this from C. Even though I would've in the real world.