README.md aktualisiert
This commit is contained in:
parent
6cbeaa0f54
commit
c38560a654
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
This cheet cheet / general guide will explain what each command will do and when to use it.
|
This cheet cheet / general guide will explain what each command will do and when to use it.
|
||||||
It's intended as a general guide/cheet cheet for linux beginners on the command line.
|
It's intended as a general guide/cheet cheet for linux beginners on the command line.
|
||||||
|
|
||||||
|
@ -187,7 +186,7 @@ cat testfile.txt |grep test
|
||||||
```
|
```
|
||||||
In this example we are using [cat](#cat) to print out the contend of the testfile. That contend is piped via the pipe symbol `|` to [grep](#grep). Grep will search for a given string in our case test. So if a line in the testfile.txt has the string test in it grep will print out the lines with the given string in it
|
In this example we are using [cat](#cat) to print out the contend of the testfile. That contend is piped via the pipe symbol `|` to [grep](#grep). Grep will search for a given string in our case test. So if a line in the testfile.txt has the string test in it grep will print out the lines with the given string in it
|
||||||
|
|
||||||
###### Redirecting
|
##### Redirecting
|
||||||
There is also another symbol used on the command line with the "output redirection operator" `>` you can redirect the output to a file
|
There is also another symbol used on the command line with the "output redirection operator" `>` you can redirect the output to a file
|
||||||
```bash
|
```bash
|
||||||
apt list --installed > installedpackages.txt
|
apt list --installed > installedpackages.txt
|
||||||
|
@ -199,7 +198,7 @@ If we would repeat that command it will overwrite the existing file but if we wa
|
||||||
echo "hi, this is a test" >> installedpackages.txt
|
echo "hi, this is a test" >> installedpackages.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Scripting
|
##### Scripting
|
||||||
If your want to combined commands you can write a shell script for that. You can use a graphical text editor like vscode or you could use a terminal text editor like [nano](#nano) or [vim](# Vi/Vim/Nvim)
|
If your want to combined commands you can write a shell script for that. You can use a graphical text editor like vscode or you could use a terminal text editor like [nano](#nano) or [vim](# Vi/Vim/Nvim)
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
Loading…
Reference in New Issue