Skip to content

Commit

Permalink
Update loops_and_scripts.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hwick authored Mar 15, 2024
1 parent 2f81b91 commit 57b533e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Accelerate_with_automation/lessons/loops_and_scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ and then we execute the following commands for each file:
> #### Why are we sometimes using curly brackets with the variable name?
> When we append a variable with free text (such as a letter, digit, or an underscore), we need shell to know where our variable name ends. By encapsulating the variable name in curly brackets we are letting shell know that everything inside the brackets is the variable name. This way when we reference it, shell knows to print the variable `$base` and not to look for a variable called `$base_badreads.fq`.
>
> Note that `$base` is actually a short form of `${base}`. We can only ditch the curly brackets and rely on the short form when the variable name is **not** followed by free text. As you write your own code remember that it is always safe to use `${variable}` and understand that errors may result from not using curly brackets when needed, even if it is convenient. As you navigate scripts written by other people you will see both forms.
We'll also add an additional `grep` statement which uses the `c` flag to count the reads it finds, and also uses the `H` flag to include the file name in the output, which will be redirected to a count summary file via `>`:
Expand Down

0 comments on commit 57b533e

Please sign in to comment.