Command ex is the non-visual form of vi (specified by POSIX). Any command used in vi in command mode (command following :) can be kept in a file for scripting against the text.