mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
chore(demo): move to right directory
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Bash scripting</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Bash scripting</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p><strong>Bash</strong> is a <a href="https://en.wikipedia.org/wiki/Unix_shell">Unix shell</a> and
|
||||
<a
|
||||
href="https://en.wikipedia.org/wiki/Command_language">command language</a>written by <a href="https://en.wikipedia.org/wiki/Brian_Fox_(computer_programmer)">Brian Fox</a> for
|
||||
the <a href="https://en.wikipedia.org/wiki/GNU_Project">GNU Project</a> as
|
||||
a <a href="https://en.wikipedia.org/wiki/Free_software">free software</a> replacement
|
||||
for the <a href="https://en.wikipedia.org/wiki/Bourne_shell">Bourne shell</a>.
|
||||
First released in 1989, it has been distributed widely as the default
|
||||
<a
|
||||
href="https://en.wikipedia.org/wiki/Login">login</a>shell for most <a href="https://en.wikipedia.org/wiki/Linux">Linux</a> distributions
|
||||
and <a href="https://en.wikipedia.org/wiki/Apple_Inc.">Apple's</a> <a href="https://en.wikipedia.org/wiki/MacOS">macOS</a> (formerly
|
||||
OS X). A version <a href="https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux">is also available for Windows 10</a>.</p>
|
||||
<p><a href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)">Bash on Wikipedia</a>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,105 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../../../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Bash startup modes</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Bash startup modes</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<h3>Login shell</h3>
|
||||
|
||||
<p>As a "login shell", Bash reads and sets (executes) the user's profile
|
||||
from /etc/profile and one of ~/.bash_profile, ~/.bash_login, or ~/.profile
|
||||
(in that order, using the first one that's readable!).</p>
|
||||
<p>When a login shell exits, Bash reads and executes commands from the file
|
||||
~/.bash_logout, if it exists.</p>
|
||||
<p>Why an extra login shell mode? There are many actions and variable sets
|
||||
that only make sense for the initial user login. That's why all UNIX® shells
|
||||
have (should have) a "login" mode.</p>
|
||||
<p><em><strong>Methods to start Bash as a login shell:</strong></em>
|
||||
|
||||
</p>
|
||||
<ul>
|
||||
<li>the first character of argv[0] is - (a hyphen): traditional UNIX® shells
|
||||
start from the login binary</li>
|
||||
<li>Bash is started with the -l option</li>
|
||||
<li>Bash is started with the --login option</li>
|
||||
</ul>
|
||||
<p><em><strong>Methods to test for login shell mode:</strong></em>
|
||||
|
||||
</p>
|
||||
<ul>
|
||||
<li>the shell option <a href="http://wiki.bash-hackers.org/internals/shell_options#login_shell">login_shell</a> is
|
||||
set</li>
|
||||
</ul>
|
||||
<p><em><strong>Related switches:</strong></em>
|
||||
|
||||
</p>
|
||||
<ul>
|
||||
<li>--noprofile disables reading of all profile files</li>
|
||||
</ul>
|
||||
<h3>Interactive shell</h3>
|
||||
|
||||
<p>When Bash starts as an interactive non-login shell, it reads and executes
|
||||
commands from ~/.bashrc. This file should contain, for example, aliases,
|
||||
since they need to be defined in every shell as they're not inherited from
|
||||
the parent shell.</p>
|
||||
<p>The feature to have a system-wide /etc/bash.bashrc or a similar system-wide
|
||||
rc-file is specific to vendors and distributors that ship <em>their own, patched variant of Bash</em>.
|
||||
The classic way to have a system-wide rc file is to source /etc/bashrc
|
||||
from every user's ~/.bashrc.</p>
|
||||
<p><em><strong>Methods to test for interactive-shell mode:</strong></em>
|
||||
|
||||
</p>
|
||||
<ul>
|
||||
<li>the special parameter $- contains the letter i (lowercase I)</li>
|
||||
</ul>
|
||||
<p><em><strong>Related switches:</strong></em>
|
||||
|
||||
</p>
|
||||
<ul>
|
||||
<li>-i forces the interactive mode</li>
|
||||
<li>--norc disables reading of the startup files (e.g. /etc/bash.bashrc if
|
||||
supported) and ~/.bashrc</li>
|
||||
<li>--rcfile defines another startup file (instead of /etc/bash.bashrc and
|
||||
~/.bashrc)</li>
|
||||
</ul>
|
||||
<h3>SH mode</h3>
|
||||
|
||||
<p>When Bash starts in SH compatiblity mode, it tries to mimic the startup
|
||||
behaviour of historical versions of sh as closely as possible, while conforming
|
||||
to the POSIX® standard as well. The profile files read are /etc/profile
|
||||
and ~/.profile, if it's a login shell.</p>
|
||||
<p>If it's not a login shell, the environment variable <a href="http://wiki.bash-hackers.org/syntax/shellvars#env">ENV</a> is
|
||||
evaluated and the resulting filename is used as the name of the startup
|
||||
file.</p>
|
||||
<p>After the startup files are read, Bash enters the <a href="http://wiki.bash-hackers.org/scripting/bashbehaviour#posix_run_mode">POSIX(r) compatiblity mode (for running, not for starting!)</a>.</p>
|
||||
<p><em><strong>Bash starts in sh compatiblity mode when:</strong></em>
|
||||
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>the base filename in argv[0] is sh (</p>
|
||||
<figure class="image">
|
||||
<img>
|
||||
</figure>
|
||||
<p> NB: /bin/sh may be linked to /bin/bash, but that doesn't mean it
|
||||
acts like /bin/bash </p>
|
||||
<figure class="image">
|
||||
<img>
|
||||
</figure>
|
||||
<p>)</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,32 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../../../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>While loop</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>While loop</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>Documentation: <a href="http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_09_02.html">http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_09_02.html</a>
|
||||
|
||||
</p><pre><code class="language-text-x-sh">#!/bin/bash
|
||||
# This script opens 4 terminal windows.
|
||||
|
||||
i="0"
|
||||
while [ $i -lt 4 ]
|
||||
do
|
||||
xterm &
|
||||
|
||||
i=$[$i+1]
|
||||
done</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>History</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>History</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>The <strong>history of Linux</strong> began in 1991 with the commencement
|
||||
of a personal project by <a href="https://en.wikipedia.org/wiki/Finland">Finnish</a> student
|
||||
<a
|
||||
href="https://en.wikipedia.org/wiki/Linus_Torvalds">Linus Torvalds</a>to create a new free operating system kernel. Since
|
||||
then, the resulting <a href="https://en.wikipedia.org/wiki/Linux_kernel">Linux kernel</a> has
|
||||
been marked by constant growth throughout its history. Since the initial
|
||||
release of its <a href="https://en.wikipedia.org/wiki/Source_code">source code</a> in
|
||||
1991, it has grown from a small number of <a href="https://en.wikipedia.org/wiki/C_Programming_Language">C</a> files
|
||||
under a license prohibiting commercial distribution to the 4.2.3 version
|
||||
in 2015 with more than 18 million lines of source code under the <a href="https://en.wikipedia.org/wiki/GNU_General_Public_License">GNU General Public License</a> v2.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
21
apps/edit-docs/demo/root/Trilium Demo/Tech/Linux/Ubuntu.html
Normal file
21
apps/edit-docs/demo/root/Trilium Demo/Tech/Linux/Ubuntu.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Ubuntu</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Ubuntu</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<p>Expand note on the left pane to see content.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,38 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../../../../../style.css">
|
||||
<base target="_parent">
|
||||
<title data-trilium-title>Unity shortcuts</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1 data-trilium-h1>Unity shortcuts</h1>
|
||||
|
||||
<div class="ck-content">
|
||||
<ul>
|
||||
<li>Hold Super - Invoke the Launcher and display the shortcuts</li>
|
||||
<li>Hold Super, then press 1 or 2 or 3 and so on until 0 to open or focus
|
||||
an application. The number corresponds to the location of the icon on the
|
||||
launcher from top to bottom.
|
||||
<ul>
|
||||
<li>Adding Shift will open a new instance of the application if it's already
|
||||
open.</li>
|
||||
<li>Holding the key is also useful when you want to get to the Launcher but
|
||||
do not want to invoke the Dash.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Super + T - Open the rubbish bin/trash can.</li>
|
||||
<li>Alt + F1 - Put keyboard focus on the Launcher, use arrow keys to navigate,
|
||||
Enter launches an application, Right arrow exposes the quicklists if an
|
||||
application has them.</li>
|
||||
<li>Ctrl + Alt + T - Launch a terminal window.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user