Command-line interfaces are heavily used by system administrators to manage computer systems. Tasks performed at a command line may often be repetitive, leading to a desire for automation. However, the critical nature of system administration suggests that humans also need to supervise an automated system’s behavior. This paper presents a programming by demonstration approach to capturing repetitive command-line procedures, which is based on a machine learning technique called version space algebra. The interactive design of this learning system enables the user to supervise the system’s training process, as well as allowing the user and system to alternate control of the learned procedure’s execution.