Edit text files, use filters, use regular expressions - Ch3 Flashcards
cat
Command used to…
create and view files;
concatenate two or more files into one
vi
Command to start vi editor
How does one exit vi
Esc key
How is text inserted using vi
i to insert before the cursor position
How is text inserted at the beginning of a line while using vi?
l
How is text appended after the current cursor position using vi?
a
How is text appended at the end of the current line using vi?
A
How is a new line opened below the current line using vi?
o
How is a new line opened above the current line using vi?
O
How are changes saved to a text file without exiting vi?
:w
How are changes saved to a text file and vi exited?
:wq or :x or ZZ
How is vi exited without saving changes to text file?
:q!
cut
Used to filter, extract and display selected output
fmt
Text formatting command used to set col width, add uniform spacing, add indentation, …
od
Octal dumping: allows viewing file in mult formata
join
Filter used to join each corresponding line from two files if join fields are identical
paste
Filter used to display lines consisting of sequentially corresponding lines from one or more specified files
sed
Stream editor used for filtering text and transforming output display as desired
sort
Command used to arrange columns of text in a specified order for default screen display or alternately redirected to a file
grep
Searches contents of one or more text files and displays matched information
What are the 3 vi modes?
Command;
Edit;
Last line
pr
Filter used to format text files for printing;
Output includes a header with file name, date & time, …
Includes a footer