<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shell on timerring</title><link>https://blogs.timerring.com/tags/shell/</link><description>Recent content in Shell on timerring</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 25 Jul 2022 20:00:00 +0800</lastBuildDate><atom:link href="https://blogs.timerring.com/tags/shell/index.xml" rel="self" type="application/rss+xml"/><item><title>Shell Scripting Fundamentals</title><link>https://blogs.timerring.com/posts/shell-scripting-fundamentals/</link><pubDate>Mon, 25 Jul 2022 20:00:00 +0800</pubDate><guid>https://blogs.timerring.com/posts/shell-scripting-fundamentals/</guid><description>&lt;p>Shell is the language we use to communicate with the operating system through the command line.&lt;/p>
&lt;p>Shell scripts can run directly on the command line, or a set of logic can be organized into a file for reuse. The command line can be thought of as a “shell script executing line by line.”&lt;/p>
&lt;p>There are many common kinds of shell scripts in Linux, including:&lt;/p>
&lt;ul>
&lt;li>Bourne Shell (&lt;code>/usr/bin/sh&lt;/code> or &lt;code>/bin/sh&lt;/code>)&lt;/li>
&lt;li>Bourne Again Shell (&lt;code>/bin/bash&lt;/code>)&lt;/li>
&lt;li>C Shell (&lt;code>/usr/bin/csh&lt;/code>)&lt;/li>
&lt;li>K Shell (&lt;code>/usr/bin/ksh&lt;/code>)&lt;/li>
&lt;li>&lt;code>zsh&lt;/code>&lt;/li>
&lt;li>…&lt;/li>
&lt;/ul>
&lt;p>Linux systems generally use &lt;code>bash&lt;/code> by default.&lt;/p>
&lt;p>The file should begin with &lt;code>#! /bin/bash&lt;/code> to specify &lt;code>bash&lt;/code> as the script interpreter.&lt;/p></description></item></channel></rss>