Article Preview
TopIntroduction
The command line interface is essential for users and administrators, as it allows them to fully harness and customize the power of operating systems (Robbins & Beebe, 2005). Shell scripting significantly extends the utility of the command line by automating a batch of commands. However, despite the popularity that shell script enjoys, its syntax is cryptic for beginners and it requires quite a bit of practice before they can put down the manual.
Shell scripting is complicated, because of the rigid syntax and the inconsistency between shell systems. Most commands have “options”, which significantly change and extend the functions of commands. However, the use of options is excessively succinct and thus, makes the commands incomprehensible for newcomers to a particular shell. Besides, the large amount of options that each command accepts, adds more cognitive load during the learning process. Take the grep command as an example, there are 47 options that grep accepts including popular ones like “-i” for case-insensitive, “-r” for recursive search, and “-w” for word only. It is difficult for novices to remember more than a few, and for experts to remember all the options. Moreover, this situation compounds when a user has to get accustomed to the syntax of some other shell as she switches to another shell system. If a Linux user wants to delete a directory in MS Windows, she may encounter difficulties, since MS Windows Command Prompt adopts del rather than rm, as the command to perform delete operations. Other superficial differences include argument position, case-sensitivity, options for commands instead of separate commands, etc. Even within the UNIX-like OS family, there are Ksh, Csh, Bash, and Zsh shells, each of which has its own features. Because of the difficulties engendered by shell scripting, there is a need for a “unified shell”.
Table 1. Natural language descriptions and the associated Shell/Batch commands
Natural Language Descriptions: Remove Directories that Contain “foo” in the Name |
Csh: if grep $name “foo” rm -r $name endif Bash: if grep $name “foo” rm -r $name fi Batch: if FINDSTR /r %name “foo” RD /s/q %name |
Previous efforts have focused on whether to set up a reasoning system for UNIX Shells, or how to augment the UNIX shell with more powerful functions. Lee proposed a natural interface for shell scripting that can reason based on pre-defined cases (Lee & Lee, 1995). The reasoning system behind the interface generates scripts for seasoned users, but it overlooks the uninitiated users. Weaver et al. (Weaver & Smith, 2012) presented another UNIX text-processing tool that extends the original shell to support frequent manipulations on text files. However, their tool is platform-sensitive. We believe that a cross-platform system can handle more cases and be particularly useful for those who work across multiple operating systems.
Natural language is recognized as a more versatile method for beginners to work with programming tasks (Ballard & Biermann, 1979; Dijkstra, 1979; Brill, 1992). The way people perceive knowledge with natural language descriptions differs from that using strict and unintuitive scripting commands and their arcane outputs. Comparisons using different dimensions were discussed including simplicity, affordance, memorability, and common results, concluding that natural language has clear advantages.