From 592f96fab586695715336638a9f202fba9bafae1 Mon Sep 17 00:00:00 2001 From: eberdan Date: Mon, 15 Apr 2024 12:14:47 -0400 Subject: [PATCH] Update AWK_module.md --- Finding_and_summarizing_colossal_files/lessons/AWK_module.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Finding_and_summarizing_colossal_files/lessons/AWK_module.md b/Finding_and_summarizing_colossal_files/lessons/AWK_module.md index 286b1689..bcb3494e 100644 --- a/Finding_and_summarizing_colossal_files/lessons/AWK_module.md +++ b/Finding_and_summarizing_colossal_files/lessons/AWK_module.md @@ -209,7 +209,7 @@ awk -F '[[:blank:],]' '{print NF}' animal_observations_edited.txt This is more complex than anything else we have done so let's break it down: -* First, you might be curious why we are using `-F` instead of `-FS`. FS represents the field separator and to CHANGE the field separator we use `-F`. We can think of the field separator as `-F 'FS'`. Here we have to do a bit of regex magic where we accept any white space or commas. Although understanding this regex is beyond this module, we can recognize that this is a range as we previously discussed and we decided to include it here as many NGS formats include multiple kinds of field separators (e.g., VCF files). +* First, you might be curious why we are using `-F` instead of `-FS`. FS represents the field separator and to CHANGE the field separator we use `-F`. We can think of this as `-F 'FS'`. Here we have to do a bit of regex magic where we accept any white space or commas. Although understanding this regex is beyond this module, we can recognize that this is a range as we previously discussed and we decided to include it here as many NGS formats include multiple kinds of field separators (e.g., VCF files). * We then skip denoting any pattern and ask `awk` to simply print the number of fields. After you run this command you might notice that there two issues. First, because we give the date `NF` is always 1 count higher than the number of animals. `awk` does math too and we can modify this command!