Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The line editor in shells and other command line programs

Interactive shells such as , , , , and provide a command line editor, which allows the user to edit the line before it is executed. Many other command-line programs provide a line editor as well, often based on the library, which is the one used by bash.

If you have a program that executes lines of input and doesn't provide a line editor, you can use the readline-based rlwrap utility to edit each line before sending it to the program.

history | excerpt history