command 'script' written in C