From beee10b77df6e22515452c5ea00ebae04af2a9f9 Mon Sep 17 00:00:00 2001 From: Benjamyn Love Date: Tue, 26 Feb 2019 00:55:29 +1100 Subject: [PATCH] Swapped over tables in commands to code blocks as they look better --- docs/Commands/commands.md | 42 +++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/docs/Commands/commands.md b/docs/Commands/commands.md index 9c47595..f843290 100644 --- a/docs/Commands/commands.md +++ b/docs/Commands/commands.md @@ -8,18 +8,20 @@ Commands that can be used for reading and manipulating files `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 | +```bash +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 | +```bash +Useful Flags Function +-n *x* Returns the first x lines of a file +``` #### awk @@ -29,23 +31,25 @@ Commands that can be used for reading and manipulating files `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 | +```bash +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 | +```bash +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)