Mercurial Hosting > reactionary
comparison src/learn_bash.html.luan @ 91:76baf48ea36b
add translation
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 02 May 2025 17:17:52 -0600 |
parents | 88f46d75d28e |
children |
comparison
equal
deleted
inserted
replaced
90:0dced626778b | 91:76baf48ea36b |
---|---|
1 local Luan = require "luan:Luan.luan" | 1 local Luan = require "luan:Luan.luan" |
2 local error = Luan.error | 2 local error = Luan.error |
3 local pairs = Luan.pairs or error() | 3 local pairs = Luan.pairs or error() |
4 local Io = require "luan:Io.luan" | 4 local Io = require "luan:Io.luan" |
5 local Http = require "luan:http/Http.luan" | 5 local Site_translator = require "luan:gpt/Site_translator.luan" |
6 local get_lang = Site_translator.get_lang or error() | |
7 local text_writer = Site_translator.text_writer or error() | |
6 local Shared = require "site:/lib/Shared.luan" | 8 local Shared = require "site:/lib/Shared.luan" |
7 local head = Shared.head or error() | 9 local head = Shared.head or error() |
8 local header = Shared.header or error() | 10 local header = Shared.header or error() |
9 | 11 |
10 | 12 |
11 local content = { | 13 local content = { |
12 intro = { | 14 intro = { |
13 title = [[Introduction]] | 15 title = [[Introduction]] |
14 content = function() | 16 content = function() |
15 %> | 17 %> |
16 <p>I really don't want to write this tutorial, but all the existing Bash tutorials are so horrible that I have no choice. I looked at books, websites, and YouTube - all horrible. They don't start with the basics. They include all kinds of useless crap. And they don't explain core concepts. So I have no choice but to write this for my <a href="/learn.html#bash">Learn Reactionary Programming</a> Bash lesson.</p> | 18 <p>I really don't want to write this tutorial, but all the existing Bash tutorials are so horrible that I have no choice. I looked at books, websites, and YouTube - all horrible. They don't start with the basics. They include all kinds of useless crap. And they don't explain core concepts. So I have no choice but to write this for my <a href="learn.html#bash">Learn Reactionary Programming</a> Bash lesson.</p> |
17 | 19 |
18 <p><a href="bash.html">Bash</a> is a <a href="https://en.wikipedia.org/wiki/Unix_shell">shell</a>, one of many, but the one I prefer. I will focus on Mac and Windows. I don't have Linux, and I hate Linux, so I won't discuss it. Most of Bash is the same on Mac and Windows, but where they differ, I will discuss both.</p> | 20 <p><a href="bash.html">Bash</a> is a <a href="https://en.wikipedia.org/wiki/Unix_shell">shell</a>, one of many, but the one I prefer. I will focus on Mac and Windows. I don't have Linux, and I hate Linux, so I won't discuss it. Most of Bash is the same on Mac and Windows, but where they differ, I will discuss both.</p> |
19 <% | 21 <% |
20 end | 22 end |
21 } | 23 } |
555 /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/fschmidt/Dropbox/bin:/Users/fschmidt/hg/luan/scripts:/usr/local/opt/postgresql@9.5/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin | 557 /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/fschmidt/Dropbox/bin:/Users/fschmidt/hg/luan/scripts:/usr/local/opt/postgresql@9.5/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin |
556 ~/learn $ subl file1 | 558 ~/learn $ subl file1 |
557 ~/learn $ | 559 ~/learn $ |
558 </code> | 560 </code> |
559 | 561 |
560 <p>Here I edit the file <code>file1</code> with <a href="/learn.html#editor">Sublime Text</a>, first by using the full path, and then by adding the directory to <code>PATH</code> so that Bash can find <code>subl</code>.</p> | 562 <p>Here I edit the file <code>file1</code> with <a href="learn.html#editor">Sublime Text</a>, first by using the full path, and then by adding the directory to <code>PATH</code> so that Bash can find <code>subl</code>.</p> |
561 | 563 |
562 <p>I have Microsoft Word on Windows. From the Windows Command Prompt (not Bash):</p> | 564 <p>I have Microsoft Word on Windows. From the Windows Command Prompt (not Bash):</p> |
563 | 565 |
564 <code block> | 566 <code block> |
565 C:\Users\fschmidt>winword | 567 C:\Users\fschmidt>winword |
1121 info.content() | 1123 info.content() |
1122 end | 1124 end |
1123 end | 1125 end |
1124 | 1126 |
1125 return function() | 1127 return function() |
1126 Io.stdout = Http.response.text_writer() | 1128 Io.stdout = text_writer() |
1127 %> | 1129 %> |
1128 <!doctype html> | 1130 <!doctype html> |
1129 <html> | 1131 <html lang="<%=get_lang()%>"> |
1130 <head> | 1132 <head> |
1131 <% head() %> | 1133 <% head() %> |
1132 <title>Reactionary Bash Tutorial</title> | 1134 <title>Reactionary Bash Tutorial</title> |
1133 </head> | 1135 </head> |
1134 <body> | 1136 <body> |