diff --git a/source/Unix/search_filter.rst b/source/Unix/search_filter.rst index a4d4d114e2de0f95684c5f8e225ea6155b6d67fe..a8506150e52d047b8d345be3dc5975d34a699ec3 100644 --- a/source/Unix/search_filter.rst +++ b/source/Unix/search_filter.rst @@ -57,6 +57,20 @@ Exercises * count the number of sequences in the file 'abcd.fa' (a multiple fasta file) * can we have the same approach with a fastq file? +.. note:: + + We can count the number of + but be careful *+* may appear in quality line even in first position. + So we have to count the *+* which are alone on the line. + + | The line **start** (anchor ^) and finish (anchor $) by *+* + | so our pattern is :code:`^+$` + | do not forget to protect your pattern by surrounding it by quotes 'pattern' + | The complete command line is: + + .. code-block:: + + grep -c '^+$' my_super_fichier.fastq + grep with Regular Expressions =============================