first general restructure with proper toc
This commit is contained in:
parent
e5a50253e0
commit
7f1ff049e2
|
@ -0,0 +1,44 @@
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
LINK = "https://github.com/ekalinin/github-markdown-toc"
|
||||||
|
OUTPUT = "readme.md"
|
||||||
|
OUTLINE = "outline.md"
|
||||||
|
INPUT = [
|
||||||
|
"essential/introduction_to_linux.md",
|
||||||
|
"essential/introduction_to_the_commandline.md",
|
||||||
|
"essential/introduction_to_administration.md",
|
||||||
|
"advanced/learning_bash_scripting.md"
|
||||||
|
]
|
||||||
|
CMD = "gh-md-toc"
|
||||||
|
FILTER = "(#"
|
||||||
|
TITLE = "Table of Contents"
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
try:
|
||||||
|
p = subprocess.Popen([CMD], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
output, err = p.communicate()
|
||||||
|
except Exception as e:
|
||||||
|
print("please install {}".format(LINK))
|
||||||
|
exit()
|
||||||
|
CONTENT = []
|
||||||
|
for f in INPUT:
|
||||||
|
p = subprocess.Popen([CMD, f], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
output, err = p.communicate()
|
||||||
|
output = output.decode().split("\n")
|
||||||
|
for line in output:
|
||||||
|
if FILTER in line:
|
||||||
|
line = line.replace(FILTER, "(./{}#".format(f))
|
||||||
|
if TITLE in line:
|
||||||
|
title = " ".join(f.replace(".md", "").split("_")).capitalize()
|
||||||
|
title = title.replace("/", ": ")
|
||||||
|
line = title
|
||||||
|
CONTENT.append(line)
|
||||||
|
p = subprocess.Popen(["cp", OUTLINE, OUTPUT], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
p.wait()
|
||||||
|
print("writing")
|
||||||
|
with open(OUTPUT, "a") as fp:
|
||||||
|
for line in CONTENT:
|
||||||
|
fp.write("{}\n".format(line))
|
||||||
|
print("done...")
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Hello world
|
||||||
|
|
||||||
|
Welcome!
|
244
readme.md
244
readme.md
|
@ -1,146 +1,132 @@
|
||||||
# About
|
# Hello world
|
||||||
|
|
||||||
Table of Contents
|
Welcome!
|
||||||
|
|
||||||
|
Essential: introduction to linux
|
||||||
=================
|
=================
|
||||||
|
|
||||||
* [Introduction to Linux](./essential/readme.md#introduction-to-linux)
|
* [Introduction to Linux](./essential/introduction_to_linux.md#introduction-to-linux)
|
||||||
* [Where does Linux originate from?](./essential/readme.md#where-does-linux-originate-from)
|
* [Where does Linux originate from?](./essential/introduction_to_linux.md#where-does-linux-originate-from)
|
||||||
* [Who is behind this project?](./essential/readme.md#who-is-behind-this-project)
|
* [Who is behind this project?](./essential/introduction_to_linux.md#who-is-behind-this-project)
|
||||||
* [What is the deal with 'GNU-slash-Linux'?](./essential/readme.md#what-is-the-deal-with-gnu-slash-linux)
|
* [What is the deal with 'GNU-slash-Linux'?](./essential/introduction_to_linux.md#what-is-the-deal-with-gnu-slash-linux)
|
||||||
* [Where can you <em>get</em> some Linux?](./essential/readme.md#where-can-you-get-some-linux)
|
* [Where can you <em>get</em> some Linux?](./essential/introduction_to_linux.md#where-can-you-get-some-linux)
|
||||||
* [Debian](./essential/readme.md#debian)
|
* [Debian](./essential/introduction_to_linux.md#debian)
|
||||||
* [How to create a virtual machine](./essential/readme.md#how-to-create-a-virtual-machine)
|
* [How to create a virtual machine](./essential/introduction_to_linux.md#how-to-create-a-virtual-machine)
|
||||||
* [Breakdown of the Debian installation](./essential/readme.md#breakdown-of-the-debian-installation)
|
* [Breakdown of the Debian installation](./essential/introduction_to_linux.md#breakdown-of-the-debian-installation)
|
||||||
* [Exercise](./essential/readme.md#exercise)
|
* [Exercise](./essential/introduction_to_linux.md#exercise)
|
||||||
* [Quick look at an idle system](./essential/readme.md#quick-look-at-an-idle-system)
|
* [Quick look at an idle system](./essential/introduction_to_linux.md#quick-look-at-an-idle-system)
|
||||||
* [Package managers](./essential/readme.md#package-managers)
|
* [Package managers](./essential/introduction_to_linux.md#package-managers)
|
||||||
* [Graphical installation](./essential/readme.md#graphical-installation)
|
* [Graphical installation](./essential/introduction_to_linux.md#graphical-installation)
|
||||||
* [Command line installation](./essential/readme.md#command-line-installation)
|
* [Command line installation](./essential/introduction_to_linux.md#command-line-installation)
|
||||||
* [Adding a secondary desktop environment](./essential/readme.md#adding-a-secondary-desktop-environment)
|
* [Adding a secondary desktop environment](./essential/introduction_to_linux.md#adding-a-secondary-desktop-environment)
|
||||||
* [Changing the runlevel](./essential/readme.md#changing-the-runlevel)
|
* [Changing the runlevel](./essential/introduction_to_linux.md#changing-the-runlevel)
|
||||||
* [Exercise](./essential/readme.md#exercise-1)
|
* [Exercise](./essential/introduction_to_linux.md#exercise-1)
|
||||||
* [Guest additions](./essential/readme.md#guest-additions)
|
* [Guest additions](./essential/introduction_to_linux.md#guest-additions)
|
||||||
* [Introduction to the command line](./essential/readme.md#introduction-to-the-command-line)
|
|
||||||
* [Compiled vs interpreted](./essential/readme.md#compiled-vs-interpreted)
|
|
||||||
* [Note on file extensions](./essential/readme.md#note-on-file-extensions)
|
|
||||||
* [More about paths](./essential/readme.md#more-about-paths)
|
|
||||||
* [Absolute and relative paths](./essential/readme.md#absolute-and-relative-paths)
|
|
||||||
* [root and / and /root are not the same thing](./essential/readme.md#root-and---and-root-are-not-the-same-thing)
|
|
||||||
* [Exercise](./essential/readme.md#exercise-2)
|
|
||||||
* [A pit stop to review what we've learned so far](./essential/readme.md#a-pit-stop-to-review-what-weve-learned-so-far)
|
|
||||||
* [Arguments and flags](./essential/readme.md#arguments-and-flags)
|
|
||||||
* [Getting help](./essential/readme.md#getting-help)
|
|
||||||
* [Options](./essential/readme.md#options)
|
|
||||||
* [Manuals](./essential/readme.md#manuals)
|
|
||||||
* [Exercise](./essential/readme.md#exercise-3)
|
|
||||||
* [Creating, modifying and deleting](./essential/readme.md#creating-modifying-and-deleting)
|
|
||||||
* [Directories](./essential/readme.md#directories)
|
|
||||||
* [Files](./essential/readme.md#files)
|
|
||||||
* [nano](./essential/readme.md#nano)
|
|
||||||
* [vi and vim](./essential/readme.md#vi-and-vim)
|
|
||||||
* [Exercise](./essential/readme.md#exercise-4)
|
|
||||||
* [Finding stuff](./essential/readme.md#finding-stuff)
|
|
||||||
* [Finding files](./essential/readme.md#finding-files)
|
|
||||||
* [Searching inside files](./essential/readme.md#searching-inside-files)
|
|
||||||
* [Wildcards and regular expressions](./essential/readme.md#wildcards-and-regular-expressions)
|
|
||||||
* [Pipes and redirects](./essential/readme.md#pipes-and-redirects)
|
|
||||||
* [Users](./essential/readme.md#users)
|
|
||||||
* [Adding and removing users](./essential/readme.md#adding-and-removing-users)
|
|
||||||
* [Switching user](./essential/readme.md#switching-user)
|
|
||||||
* [Permissions](./essential/readme.md#permissions)
|
|
||||||
* [Octal number system](./essential/readme.md#octal-number-system)
|
|
||||||
* [Changing permissions](./essential/readme.md#changing-permissions)
|
|
||||||
* [Changing ownership](./essential/readme.md#changing-ownership)
|
|
||||||
* [Remote control of a server](./essential/readme.md#remote-control-of-a-server)
|
|
||||||
* [History](./essential/readme.md#history)
|
|
||||||
* [SSH and SFTP](./essential/readme.md#ssh-and-sftp)
|
|
||||||
* [Bandit](./essential/readme.md#bandit)
|
|
||||||
|
|
||||||
# Planning
|
<!-- Created by https://github.com/ekalinin/github-markdown-toc -->
|
||||||
|
|
||||||
## Essential
|
|
||||||
|
|
||||||
### Day 1
|
Essential: introduction to the commandline
|
||||||
|
=================
|
||||||
|
|
||||||
* [Introduction to Linux](./essential/readme.md#introduction-to-linux)
|
* [Introduction to the command line](./essential/introduction_to_the_commandline.md#introduction-to-the-command-line)
|
||||||
* [Where does Linux originate from?](./essential/readme.md#where-does-linux-originate-from)
|
* [Compiled vs interpreted](./essential/introduction_to_the_commandline.md#compiled-vs-interpreted)
|
||||||
* [Who is behind this project?](./essential/readme.md#who-is-behind-this-project)
|
* [Note on file extensions](./essential/introduction_to_the_commandline.md#note-on-file-extensions)
|
||||||
* [What is the deal with 'GNU-slash-Linux'?](./essential/readme.md#what-is-the-deal-with-gnu-slash-linux)
|
* [More about paths](./essential/introduction_to_the_commandline.md#more-about-paths)
|
||||||
* [Where can you <em>get</em> some Linux?](./essential/readme.md#where-can-you-get-some-linux)
|
* [Absolute and relative paths](./essential/introduction_to_the_commandline.md#absolute-and-relative-paths)
|
||||||
* [Debian](./essential/readme.md#debian)
|
* [root and / and /root are not the same thing](./essential/introduction_to_the_commandline.md#root-and---and-root-are-not-the-same-thing)
|
||||||
* [How to create a virtual machine](./essential/readme.md#how-to-create-a-virtual-machine)
|
* [Exercise](./essential/introduction_to_the_commandline.md#exercise)
|
||||||
* [Breakdown of the Debian installation](./essential/readme.md#breakdown-of-the-debian-installation)
|
* [A pit stop to review what we've learned so far](./essential/introduction_to_the_commandline.md#a-pit-stop-to-review-what-weve-learned-so-far)
|
||||||
* [Exercise](./essential/readme.md#exercise)
|
* [Arguments and flags](./essential/introduction_to_the_commandline.md#arguments-and-flags)
|
||||||
* [Quick look at an idle system](./essential/readme.md#quick-look-at-an-idle-system)
|
* [Getting help](./essential/introduction_to_the_commandline.md#getting-help)
|
||||||
* [Package managers](./essential/readme.md#package-managers)
|
* [Options](./essential/introduction_to_the_commandline.md#options)
|
||||||
* [Graphical installation](./essential/readme.md#graphical-installation)
|
* [Manuals](./essential/introduction_to_the_commandline.md#manuals)
|
||||||
* [Command line installation](./essential/readme.md#command-line-installation)
|
* [Exercise](./essential/introduction_to_the_commandline.md#exercise-1)
|
||||||
* [Adding a secondary desktop environment](./essential/readme.md#adding-a-secondary-desktop-environment)
|
* [Creating, modifying and deleting](./essential/introduction_to_the_commandline.md#creating-modifying-and-deleting)
|
||||||
* [Changing the runlevel](./essential/readme.md#changing-the-runlevel)
|
* [Directories](./essential/introduction_to_the_commandline.md#directories)
|
||||||
* [Exercise](./essential/readme.md#exercise-1)
|
* [Files](./essential/introduction_to_the_commandline.md#files)
|
||||||
|
* [Links](./essential/introduction_to_the_commandline.md#links)
|
||||||
|
* [Editors](./essential/introduction_to_the_commandline.md#editors)
|
||||||
|
* [nano](./essential/introduction_to_the_commandline.md#nano)
|
||||||
|
* [Exercise](./essential/introduction_to_the_commandline.md#exercise-2)
|
||||||
|
* [vi and vim](./essential/introduction_to_the_commandline.md#vi-and-vim)
|
||||||
|
* [Exercise](./essential/introduction_to_the_commandline.md#exercise-3)
|
||||||
|
* [Opening or peaking into files](./essential/introduction_to_the_commandline.md#opening-or-peaking-into-files)
|
||||||
|
* [Exercise](./essential/introduction_to_the_commandline.md#exercise-4)
|
||||||
|
* [Finding stuff](./essential/introduction_to_the_commandline.md#finding-stuff)
|
||||||
|
* [Finding files](./essential/introduction_to_the_commandline.md#finding-files)
|
||||||
|
* [The easy way](./essential/introduction_to_the_commandline.md#the-easy-way)
|
||||||
|
* [The hard way](./essential/introduction_to_the_commandline.md#the-hard-way)
|
||||||
|
* [Exercise](./essential/introduction_to_the_commandline.md#exercise-5)
|
||||||
|
* [Searching inside files](./essential/introduction_to_the_commandline.md#searching-inside-files)
|
||||||
|
* [Wildcards and regular expressions](./essential/introduction_to_the_commandline.md#wildcards-and-regular-expressions)
|
||||||
|
* [Wildcards](./essential/introduction_to_the_commandline.md#wildcards)
|
||||||
|
* [Exercise](./essential/introduction_to_the_commandline.md#exercise-6)
|
||||||
|
* [Exercise](./essential/introduction_to_the_commandline.md#exercise-7)
|
||||||
|
* [Regular expressions](./essential/introduction_to_the_commandline.md#regular-expressions)
|
||||||
|
* [Pipes and redirects](./essential/introduction_to_the_commandline.md#pipes-and-redirects)
|
||||||
|
* [Redirecting](./essential/introduction_to_the_commandline.md#redirecting)
|
||||||
|
* [Piping](./essential/introduction_to_the_commandline.md#piping)
|
||||||
|
* [Text manipulation](./essential/introduction_to_the_commandline.md#text-manipulation)
|
||||||
|
* [Ideas](./essential/introduction_to_the_commandline.md#ideas)
|
||||||
|
|
||||||
### Day 2
|
<!-- Created by https://github.com/ekalinin/github-markdown-toc -->
|
||||||
|
|
||||||
* [Guest additions](./essential/readme.md#guest-additions)
|
|
||||||
* [Introduction to the command line](./essential/readme.md#introduction-to-the-command-line)
|
|
||||||
* [Compiled vs interpreted](./essential/readme.md#compiled-vs-interpreted)
|
|
||||||
* [Note on file extensions](./essential/readme.md#note-on-file-extensions)
|
|
||||||
* [More about paths](./essential/readme.md#more-about-paths)
|
|
||||||
* [Absolute and relative paths](./essential/readme.md#absolute-and-relative-paths)
|
|
||||||
* [root and / and /root are not the same thing](./essential/readme.md#root-and---and-root-are-not-the-same-thing)
|
|
||||||
* [Exercise](./essential/readme.md#exercise-2)
|
|
||||||
* [A pit stop to review what we've learned so far](./essential/readme.md#a-pit-stop-to-review-what-weve-learned-so-far)
|
|
||||||
* [Arguments and flags](./essential/readme.md#arguments-and-flags)
|
|
||||||
* [Getting help](./essential/readme.md#getting-help)
|
|
||||||
* [Options](./essential/readme.md#options)
|
|
||||||
* [Manuals](./essential/readme.md#manuals)
|
|
||||||
* [Exercise](./essential/readme.md#exercise-3)
|
|
||||||
* [Creating, modifying and deleting](./essential/readme.md#creating-modifying-and-deleting)
|
|
||||||
* [Directories](./essential/readme.md#directories)
|
|
||||||
* [Files](./essential/readme.md#files)
|
|
||||||
* [nano](./essential/readme.md#nano)
|
|
||||||
* [vi and vim](./essential/readme.md#vi-and-vim)
|
|
||||||
* [Exercise](./essential/readme.md#exercise-4)
|
|
||||||
|
|
||||||
### Day 3
|
Essential: introduction to administration
|
||||||
|
=================
|
||||||
|
|
||||||
* [Finding stuff](./essential/readme.md#finding-stuff)
|
* [Users](./essential/introduction_to_administration.md#users)
|
||||||
* [Finding files](./essential/readme.md#finding-files)
|
* [Adding and removing users](./essential/introduction_to_administration.md#adding-and-removing-users)
|
||||||
* [Searching inside files](./essential/readme.md#searching-inside-files)
|
* [GNOME](./essential/introduction_to_administration.md#gnome)
|
||||||
* [Wildcards and regular expressions](./essential/readme.md#wildcards-and-regular-expressions)
|
* [command line](./essential/introduction_to_administration.md#command-line)
|
||||||
* [Pipes and redirects](./essential/readme.md#pipes-and-redirects)
|
* [Switching user](./essential/introduction_to_administration.md#switching-user)
|
||||||
* [Users](./essential/readme.md#users)
|
* [Groups](./essential/introduction_to_administration.md#groups)
|
||||||
* [Adding and removing users](./essential/readme.md#adding-and-removing-users)
|
* [Permissions](./essential/introduction_to_administration.md#permissions)
|
||||||
* [Switching user](./essential/readme.md#switching-user)
|
* [Octal number system](./essential/introduction_to_administration.md#octal-number-system)
|
||||||
* [Permissions](./essential/readme.md#permissions)
|
* [Changing ownership](./essential/introduction_to_administration.md#changing-ownership)
|
||||||
* [Octal number system](./essential/readme.md#octal-number-system)
|
* [umask](./essential/introduction_to_administration.md#umask)
|
||||||
* [Changing permissions](./essential/readme.md#changing-permissions)
|
* [Essential programs](./essential/introduction_to_administration.md#essential-programs)
|
||||||
* [Changing ownership](./essential/readme.md#changing-ownership)
|
* [Remote control of a server](./essential/introduction_to_administration.md#remote-control-of-a-server)
|
||||||
* [Remote control of a server](./essential/readme.md#remote-control-of-a-server)
|
* [History](./essential/introduction_to_administration.md#history)
|
||||||
* [History](./essential/readme.md#history)
|
* [SSH and SFTP](./essential/introduction_to_administration.md#ssh-and-sftp)
|
||||||
* [SSH and SFTP](./essential/readme.md#ssh-and-sftp)
|
* [Bandit](./essential/introduction_to_administration.md#bandit)
|
||||||
|
|
||||||
### Day 4
|
<!-- Created by https://github.com/ekalinin/github-markdown-toc -->
|
||||||
|
|
||||||
* [Bandit](./essential/readme.md#bandit)
|
|
||||||
|
|
||||||
### Day 5
|
Advanced: learning bash scripting
|
||||||
|
=================
|
||||||
|
|
||||||
* [Bandit](./essential/readme.md#bandit)
|
* [bash](./advanced/learning_bash_scripting.md#bash)
|
||||||
* [Moving forward](./essential/readme.md#moving-forward)
|
* [Using variables to store the output of command](./advanced/learning_bash_scripting.md#using-variables-to-store-the-output-of-command)
|
||||||
|
* [Coding challenge - Output system stats](./advanced/learning_bash_scripting.md#coding-challenge---output-system-stats)
|
||||||
|
* [Getting input into the script](./advanced/learning_bash_scripting.md#getting-input-into-the-script)
|
||||||
|
* [With read](./advanced/learning_bash_scripting.md#with-read)
|
||||||
|
* [Coding challenge - Secret input](./advanced/learning_bash_scripting.md#coding-challenge---secret-input)
|
||||||
|
* [read multiple variables](./advanced/learning_bash_scripting.md#read-multiple-variables)
|
||||||
|
* [With command line arguments](./advanced/learning_bash_scripting.md#with-command-line-arguments)
|
||||||
|
* [From a file](./advanced/learning_bash_scripting.md#from-a-file)
|
||||||
|
* [From a pipe](./advanced/learning_bash_scripting.md#from-a-pipe)
|
||||||
|
* [Coding Challenge - output the exact output below](./advanced/learning_bash_scripting.md#coding-challenge---output-the-exact-output-below)
|
||||||
|
* [More math!](./advanced/learning_bash_scripting.md#more-math)
|
||||||
|
* [The let keyword](./advanced/learning_bash_scripting.md#the-let-keyword)
|
||||||
|
* [The expr keyword](./advanced/learning_bash_scripting.md#the-expr-keyword)
|
||||||
|
* [Double parenthesis](./advanced/learning_bash_scripting.md#double-parenthesis)
|
||||||
|
* [Variable length](./advanced/learning_bash_scripting.md#variable-length)
|
||||||
|
* [If Statements - How to make decisions within your Bash script.](./advanced/learning_bash_scripting.md#if-statements---how-to-make-decisions-within-your-bash-script)
|
||||||
|
* [How does it work behind the scenes?](./advanced/learning_bash_scripting.md#how-does-it-work-behind-the-scenes)
|
||||||
|
* [Nested if statements](./advanced/learning_bash_scripting.md#nested-if-statements)
|
||||||
|
* [Coding challenge - File information](./advanced/learning_bash_scripting.md#coding-challenge---file-information)
|
||||||
|
* [A <em>modern</em> version of test](./advanced/learning_bash_scripting.md#a-modern-version-of-test)
|
||||||
|
* [[[ ]]](./advanced/learning_bash_scripting.md#--)
|
||||||
|
* [(( ))](./advanced/learning_bash_scripting.md#---1)
|
||||||
|
* [&& and ||](./advanced/learning_bash_scripting.md#-and--)
|
||||||
|
* [Loops - A variety of ways to perform repetitive tasks.](./advanced/learning_bash_scripting.md#loops---a-variety-of-ways-to-perform-repetitive-tasks)
|
||||||
|
* [Functions - Reuse code to make life easier.](./advanced/learning_bash_scripting.md#functions---reuse-code-to-make-life-easier)
|
||||||
|
* [User Interface - Make your scripts user friendly.](./advanced/learning_bash_scripting.md#user-interface---make-your-scripts-user-friendly)
|
||||||
|
* [Python](./advanced/learning_bash_scripting.md#python)
|
||||||
|
* [Vim as an IDE](./advanced/learning_bash_scripting.md#vim-as-an-ide)
|
||||||
|
|
||||||
## CCNA
|
<!-- Created by https://github.com/ekalinin/github-markdown-toc -->
|
||||||
|
|
||||||
### Day 1 - 5
|
|
||||||
|
|
||||||
* Idem as [essential](#essential)
|
|
||||||
|
|
||||||
### Day 6 - 8
|
|
||||||
|
|
||||||
* Networking on Debian
|
|
||||||
|
|
||||||
### Day 9 - 10
|
|
||||||
|
|
||||||
* bash scripting
|
|
||||||
* vim customization
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue