From 0b7ebe736b679704d4b6cd2a46644b62c78e51de Mon Sep 17 00:00:00 2001 From: rasicd Date: Sat, 10 Nov 2018 11:55:16 +0000 Subject: [PATCH] added redirecting page git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@82 a672b425-5310-4d7a-af5c-997e18724b81 --- site/pages/scripts/redirecting.html | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 site/pages/scripts/redirecting.html diff --git a/site/pages/scripts/redirecting.html b/site/pages/scripts/redirecting.html new file mode 100644 index 0000000..6991e74 --- /dev/null +++ b/site/pages/scripts/redirecting.html @@ -0,0 +1,31 @@ + + + + + + + + +

Redirecting Outputs

+

First of all, to redirect a certain output of the command-line we have to use the symbol ">".

+

Even in this case, we will use a file named "Hello", in which we want to move a certain output, like "Sun".

+
+

$ echo Sun > Hello

+

So if we copy the the file on our command-line, the output will be the following:

+

$ cat Hello
+ Sun

+
+
+

If we want to move a certain output to an existing file, we just have to use twice the ">" symbol.

+
+

$ echo Bright >> Hello

+

$ cat Hello
+ Sun
+ Bright

+
+
+

Redirecting Inputs

+

To redirect an input from a file for a command, you have to use symbol "<".
+ In fact, it's not useful, as the result that obtain is just the content of the file.

+

Redirecting inputs becomes useful when it comes to chaining, so let's see it.

+

Chaining