diff --git a/7_streams_and_pipes.Rmd b/7_streams_and_pipes.Rmd index 2cf9654abaabf1e98b37a9c55a84cf7682589e2d..a0ccd7fa51b1c037f03af88da4c6ae7802d556eb 100644 --- a/7_streams_and_pipes.Rmd +++ b/7_streams_and_pipes.Rmd @@ -62,7 +62,7 @@ cat .bashrc # Streams manipulation -You can use the `>` character to redirect a flux toward a file. The following command make a copy of your `.bashrc` files. +You can use the `>` character to redirect a flux toward a file. The following command makes a copy of your `.bashrc` files. ```sh cat .bashrc > my_bashrc @@ -82,11 +82,11 @@ cal -N 2 > my_cal What is the content of `my_cal` what happened ? -The `>` command can have an argument, the syntax to redirect **stdout** to a file is `1>` it's also the default option (equivalent to `>`). Here the `-N` option doesn't exists, `cal` throws an error. Errors are sent to **stderr** which have the number 2. +The `>` command can have an argument, the syntax to redirect **stdout** to a file is `1>` it's also the default option (equivalent to `>`). Here the `-N` option doesn't exist, `cal` throws an error. Errors are sent to **stderr** which have the number 2. Save the error message in `my_cal` and check the results with `less`. -We have seen tha `>` overwrite the content of the file. Try the following commands: +We have seen that `>` overwrite the content of the file. Try the following commands: ```sh cal 2020 > my_cal @@ -96,7 +96,7 @@ cal -N 2 2>> my_cal Check the results with the command `less`. -The command `>` send the stream from the left to the file on the right. Try the following: +The command `>` sends the stream from the left to the file on the right. Try the following: ```sh cat < my_cal @@ -114,7 +114,7 @@ Type some text and type `EOF` on a new line. `EOF` stand for **e**nd **o**f **f* What happened ? Can you check the content of `my_notes` ? How would you modify this command to add new notes? -Finaly you can redirect a stream toward another stream with the following syntax: +Finally, you can redirect a stream toward another stream with the following syntax: ```sh cal -N2 2&> my_redirection @@ -155,7 +155,7 @@ Analyze the following command, what would it do ? wget -q -O - http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.fa.gz | gzip -dc | less ``` -Remember that most Unix command process input and output line by line. Which means that you can process huge dataset without intermediate files or huge RAM capacity. +Remember that most Unix command process input and output line by line. Which means that you can process huge datasets without intermediate files or huge RAM capacity. > We have users the following commands: >