Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1
Cursor  up—Ctrl+P
Delete character—Ctrl+D
Delete line—Ctrl+K
Go to start of line—Ctrl+A
Go to end of line—Ctrl+E
Help—Ctrl+H
Quit—Ctrl+X, Ctrl+C
Save as—Ctrl+X, Ctrl+W
Save file—Ctrl+X, Ctrl+S
Search backward—Ctrl+R
Search forward—Ctrl+S
Start tutorial—Ctrl+H, T
Undo—Ctrl+X, U

One of the best reasons to learn how to use emacs is that you can use nearly
all the same keystrokes to edit commands on the bash shell command line,
although it is possible to change the default to use vi keybindings. Another
reason is that like vi, emacs is universally available for installation on
nearly every UNIX and Linux system, including Apple’s macOS.


Working with sed and awk


sed, which is short for stream editor, is a command that is used to perform
transformations on text. It works from the command line and processes text
via standard in and standard out. It does not modify the original input and
does not save the output unless you redirect that output to a file. It is most
useful this way or when piped between other commands.


awk is a small programming language for processing strings. It takes in text,
transforms it in whatever way you tell it to, and then outputs the transformed
text. It doesn’t do as much as other languages, but what it does do it does with
elegance and speed.


Both sed and awk run from the command line. There is a lot to them—more
than can be covered in a short section of one chapter of a long book—but you
can learn enough about each in just a few minutes to find them useful. If you
want to continue learning about them, there are great resources available

Free download pdf