Expect Script Install expect. $ apt-get install expect Make necessary changes to expect script. Run expect script every 'x' seconds from a shell script. memsave command memsave operation is implemented in cpus.c