<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Missing Semester on KKKZOZ&#39;s Blog</title>
    <link>http://blog.kkkzoz.top/series/missing-semester/</link>
    <description>Recent content in Missing Semester on KKKZOZ&#39;s Blog</description>
    <image>
      <title>KKKZOZ&#39;s Blog</title>
      <url>http://blog.kkkzoz.top/images/papermod-cover.png</url>
      <link>http://blog.kkkzoz.top/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.147.0</generator>
    <language>en</language>
    <lastBuildDate>Tue, 11 Aug 2026 20:26:05 +0800</lastBuildDate>
    <atom:link href="http://blog.kkkzoz.top/series/missing-semester/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>[Missing Semester 05] Lecture 5</title>
      <link>http://blog.kkkzoz.top/posts/missing-semester-lecture-5/</link>
      <pubDate>Thu, 17 Oct 2024 00:00:00 +0000</pubDate>
      <guid>http://blog.kkkzoz.top/posts/missing-semester-lecture-5/</guid>
      <description>&lt;h2 id=&#34;job-control&#34;&gt;Job Control&lt;/h2&gt;
&lt;p&gt;Signals can do other things beyond killing a process. For instance, SIGSTOP pauses a process. In the terminal, typing Ctrl-Z will prompt the shell to send a SIGTSTP signal, short for Terminal Stop.&lt;/p&gt;
&lt;p&gt;We can then continue the paused job in the foreground or in the background using &lt;code&gt;fg&lt;/code&gt; or &lt;code&gt;bg&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;One more thing to know is that the &amp;amp; suffix in a command will run the command in the background, giving you the prompt back.&lt;/p&gt;</description>
    </item>
    <item>
      <title>[Missing Semester 04] Lecture 4</title>
      <link>http://blog.kkkzoz.top/posts/missing-semester-lecture-4/</link>
      <pubDate>Tue, 15 Oct 2024 00:00:00 +0000</pubDate>
      <guid>http://blog.kkkzoz.top/posts/missing-semester-lecture-4/</guid>
      <description>&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# journalctl run remotely, grep run locally&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ssh myserver journalctl &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep sshd
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# both commands run remotely&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ssh myserver &lt;span class=&#34;s2&#34;&gt;&amp;#34;journalctl | grep sshd&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;sed&#34;&gt;&lt;code&gt;sed&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;sed&lt;/code&gt; (Stream Editor) is a powerful command-line tool in Unix/Linux that is used for parsing and transforming text, typically used for finding, replacing, or deleting content in a file or input stream.&lt;/p&gt;
&lt;p&gt;Common sed Commands:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Substitution&lt;/strong&gt; (&lt;code&gt;s&lt;/code&gt;):&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/pattern/replacement/&amp;#39;&lt;/span&gt; file
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;s: The substitution command.&lt;/li&gt;
&lt;li&gt;pattern: The string or pattern to search for.&lt;/li&gt;
&lt;li&gt;replacement: The string to replace the pattern with.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example:&lt;/p&gt;</description>
    </item>
    <item>
      <title>[Missing Semester 02] Lecture 2</title>
      <link>http://blog.kkkzoz.top/posts/missing-semester-lecture-2/</link>
      <pubDate>Fri, 11 Oct 2024 00:00:00 +0000</pubDate>
      <guid>http://blog.kkkzoz.top/posts/missing-semester-lecture-2/</guid>
      <description>&lt;h2 id=&#34;shell-scripting&#34;&gt;Shell Scripting&lt;/h2&gt;
&lt;p&gt;To assign variables in bash, use the syntax &lt;code&gt;foo=bar&lt;/code&gt; and access the value of the variable with &lt;code&gt;$foo&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note that &lt;code&gt;foo = bar&lt;/code&gt; will not work since it is interpreted as calling the foo program with arguments &lt;code&gt;=&lt;/code&gt; and &lt;code&gt;bar&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;bash uses a variety of special variables to refer to arguments, error codes, and other relevant variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;$0 - Name of the script&lt;/li&gt;
&lt;li&gt;$1 to $9 - Arguments to the script. $1 is the first argument and so on.&lt;/li&gt;
&lt;li&gt;$@ - All the arguments&lt;/li&gt;
&lt;li&gt;$# - Number of arguments&lt;/li&gt;
&lt;li&gt;$? - Return code of the previous command&lt;/li&gt;
&lt;li&gt;$$ - Process identification number (PID) for the current script&lt;/li&gt;
&lt;li&gt;!! - Entire last command, including arguments. A common pattern is to execute a command only for it to fail due to missing permissions; you can quickly re-execute the command with sudo by doing sudo !!&lt;/li&gt;
&lt;li&gt;$_ - Last argument from the last command. If you are in an interactive shell, you can also quickly get this value by typing Esc followed by . or Alt+.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Exit codes can be used to conditionally execute commands using &amp;amp;&amp;amp; (and operator) and || (or operator).&lt;/p&gt;</description>
    </item>
    <item>
      <title>[Missing Semester 01] Lecture 1</title>
      <link>http://blog.kkkzoz.top/posts/missing-semester-lecture-1/</link>
      <pubDate>Wed, 09 Oct 2024 00:00:00 +0000</pubDate>
      <guid>http://blog.kkkzoz.top/posts/missing-semester-lecture-1/</guid>
      <description>&lt;h2 id=&#34;the-shell&#34;&gt;The shell&lt;/h2&gt;
&lt;p&gt;How does the shell know how to find the &lt;code&gt;date&lt;/code&gt; or &lt;code&gt;echo&lt;/code&gt; programs?&lt;/p&gt;
&lt;p&gt;The shell is a programming environment, just like Python, and so it has variables,
conditionals, loops, and functions.&lt;/p&gt;
&lt;p&gt;If the shell is asked to execute a command that doesn’t match one of its programming keywords,
it consults an &lt;em&gt;environment variable&lt;/em&gt; called &lt;code&gt;$PATH&lt;/code&gt; that lists which directories
the shell should search for programs when it is given a command&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
