Linux Class Week Oct 29 - Nov 2 2018 EXERCISES
Explain step-by-step the commands as well as their output:
ls -l | grep -v '^d' | wc -l
Assume the file SequenceFile. The file contain DNA sequences and their names. For every entry the format is:
Answer the following questions:
- How many sequences exist?
- How many sequences contain at least one time the motif ACCA
- How many sequences are obtained from modern humans (hg19)
- How many sequences are obtained from the following primates (hg19 or panTro4 or ponAbe2)
Create a folder called bin2 in your home directory. Add the folder bin2 in your PATH. Create a script that will find out how many files or directories in a folder start with an 'A' (either small or capital) and put it in bin2. Execute the script in some folders and demonstrate that it works properly.
Assume the file ExpressionData.
- Output only its second column.
- Output its second and fourth column.
- Use awk (google it), to print the sum of the second and the fourth column.
- obtain a list of all PDF files
- obtain a list of all PDF files that contain the word microsat (case insensitive)
- obtain a list of all PDF files taht contain the word microsat (case sensitive)
- use the command find (if you don't know it, just google it) to find all files with the suffix '.txt' that are contained in your home folder