Section 7 - Searching and Extracting Data from Files Flashcards
What is a command line pipe?
The output of the first command is used as input for the second command
What is the benefit of using pipes?
Pipes allow for quick execution of commands performing complex tasks
What is the grep command?
The grep command searches for keywords in the output
What is input and output redirection?
How can a program’s output be used as an input?
via the process of piping
What is the Xargs command?
Enables a user to generate command line options from files or other programs’ output
what does > do?
creates a new file containing standard output ( can overwrite file)
> >
appends standard output ot an existing file ( not overwrite it)
2>
New file with any standard errors the program with throw
2»
to append errors to existing file
&>
creates new file with standard error and standard output (overwrites)
<
sends content to specified file as input back into standard input.
What is normally standard input?
Keyboard is the usual standard input
«
accepts text on following lines as standard input
<>
specified file used both for standard input and output ( can read and write the file)