Overview
Learning Objectives
By the end of this week, students will be able to:
- Use the
grep
command to search for specific characters or patterns in a text file. - Redirect command output to a file using output redirection (
>
and>>
) to write or append content. - Apply the pipe (
|
) operator to create pipelines, connecting the output of one command as the input to another. - Utilize the
wc
command to count lines, words, and characters in an input. - Employ the
sort
command to organize input data in a specified order. - Differentiate between
>
(overwrites content) and>>
(appends content) for file redirection. - Construct pipelines (
first | second
) to efficiently combine multiple commands in sequence.
Ongoing List of Commands
cp [old] [new] copies a file
mkdir [directory-name] creates a new directory
ls lists all the files and directories in a specific location
mv [old] [new] moves(renames) a file or directory
rm removes(deletes) a file
`*` matches zero or more characters in a filename, so *.txt matches ALL files ending in .txt
`?` matches a single character in a filename, so ?.txt matches a.txt or b.txt but not ab.txt
+ Use of the <button>control</button> key may be described in many ways, including Ctrl-X, Control-X, or ^X.
+ The shell does not have a trash bin, once something is deleted it is really gone.
+ Most file names are `something.extension`. The extension is not required, but does help bioinformatic programs find required files (ex. FASTQC)
+ Depending on the type of work you do, you may need a more powerful text editor than Nano.