Added in the new files and swapped the theme to my modified version of bootstrap386

This commit is contained in:
benjamyn committed 2019-02-25 23:20:44 +11:00
1 parent 833244037f
commit 480928ab7c
10 files changed
+33 -19

No files matched your search

+60
View File
@@ -0,0 +1,60 @@
# Commands
## Manipulating files
Commands that can be used for reading and manipulating files
### tail
`tail` by default reads the last 5 lines of the input file and then exits
| Useful Flags | Function |
| ------------- |:-------------|
| -n *x* | Returns the last x lines of a file |
| -f | Follows the end of the file, so any new data will be printed out to the screen |
### head
`head` by default reads the first 5 lines of the input file and then exits
| Useful Flags | Function |
| ------------- |:-------------|
| -n *x* | Returns the first x lines of a file |
### awk
`awk` is used to extract, layout and modify data using the command line (It is way more then this but its all I use it for)
### sed
`sed` is the '**S**tream **ED**itor' you can use to to modify files via commands and scripts using patterns, an [example](examples/seddnszone.md) can be seen here
| Useful Flags | Function |
| ------------- |:-------------|
| -i | In-place, writes the changes to the file |
| -f | Use a script file instead of reading the expression from STDIN |
### grep
`grep` is used to match text in a file,
| Useful Flags | Function |
| ------------- |:-------------|
| -o | Returns only the matched data (Useless without regex really) |
| -E | Allows extended regex to be used in the search, [regex info](/regex)|
| -P | Allows the use of Perl regex, this uses a different syntax to -E |
| -i | Makes the search case insensitive |
| -r | Searches files recursively (i.e if you have quite a few files and folders it will search through all of them) |
| -l | Returns the filename where the data was matched instead of the matched data |
Some examples of grep usage can be found [here](/examples/grep)
### lsof
`lsof` is a command that will show you what processes have specified file open currently you can see an example [here](/examples/lsof)
## Manipulating the standard input
These commands can be used to manipulate data in the standard input
### rev
+26
View File
@@ -0,0 +1,26 @@
#Regex
I am by no means an expert when it comes to regex, this document will propbably have some inaccuracies in it but hey it is what it is :)
##What is regex?
Regex is shorthand for regular expressions, it is a system for pattern matching in text, when combined with commands it can be used for quite a lot of things
##Useful regex patterns
* **.** \- Matches any char
* **^** \- Matches at the start of a line
* **$** \- Matches at the end of a line
* **?** \- Matches once or none
* **+** \- Matches once or more
* **\*** \- Matches zero or more times
* **\d** \- Match any decimal (0-9)
* **\b** \- Defines a word boundary
* **{x}** \- Repeat exactly x times
* **{x, y}** \- Repeat pattern x to y times
##Regex logic
* **|** \- Logical OR, allows pattern1 OR pattern2 to match
* **(x|y)** \- Matches a group of patterns
I have made a few examples [here](/examples/regexmatch)