BeamerReveal

 view release on metacpan or  search on metacpan

beamer-reveal-example.html  view on Meta::CPAN


<aside class="notes"> </aside>
</section>

      </div>
      <div class="quarto-auto-generated-content" style="display: none;">
	<div class="footer footer-default">
	</div>
    </div></div>

    <script>window.backupDefine = window.define; window.define = undefined;</script>
    <script src="beamer-reveal-example_files/libs/revealjs/dist/reveal.js"></script>
    <!-- reveal.js plugins -->
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/quarto-support/support.js"></script>
    

    <script src="beamer-reveal-example_files/libs/revealjs/plugin/notes/notes.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/search/search.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/zoom/zoom.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/math/math.js"></script>
    <script>window.define = window.backupDefine; window.backupDefine = undefined;</script>

    <script>

      // Full list of configuration options available at:
      // https://revealjs.com/config/
      Reveal.initialize({
	  'controlsAuto': false,
	  'previewLinksAuto': false,
	  'pdfSeparateFragments': false,
	  'autoAnimateEasing': "ease",

beamer-reveal-example_files/libs/revealjs/plugin/highlight/highlight.esm.js  view on Meta::CPAN

function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete...
/*!
 * reveal.js plugin that adds syntax highlight support.
 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...

beamer-reveal-example_files/libs/revealjs/plugin/highlight/highlight.js  view on Meta::CPAN

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealHighlight=t()}(this,(function(){"use strict";function e...
/*!
	 * reveal.js plugin that adds syntax highlight support.
	 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...

index.html  view on Meta::CPAN


<aside class="notes"> </aside>
</section>

      </div>
      <div class="quarto-auto-generated-content" style="display: none;">
	<div class="footer footer-default">
	</div>
    </div></div>

    <script>window.backupDefine = window.define; window.define = undefined;</script>
    <script src="beamer-reveal-example_files/libs/revealjs/dist/reveal.js"></script>
    <!-- reveal.js plugins -->
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/quarto-support/support.js"></script>
    

    <script src="beamer-reveal-example_files/libs/revealjs/plugin/notes/notes.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/search/search.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/zoom/zoom.js"></script>
    <script src="beamer-reveal-example_files/libs/revealjs/plugin/math/math.js"></script>
    <script>window.define = window.backupDefine; window.backupDefine = undefined;</script>

    <script>

      // Full list of configuration options available at:
      // https://revealjs.com/config/
      Reveal.initialize({
	  'controlsAuto': false,
	  'previewLinksAuto': false,
	  'pdfSeparateFragments': false,
	  'autoAnimateEasing': "ease",

quarto/preso.html  view on Meta::CPAN

<aside class="notes">
</aside>
</section>
    </div>
  <div class="quarto-auto-generated-content" style="display: none;">
<div class="footer footer-default">

</div>
</div></div>

  <script>window.backupDefine = window.define; window.define = undefined;</script>
  <script src="preso_files/libs/revealjs/dist/reveal.js"></script>
  <!-- reveal.js plugins -->
  <script src="preso_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
  <script src="preso_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
  <script src="preso_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
  <script src="preso_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
  <script src="preso_files/libs/revealjs/plugin/quarto-support/support.js"></script>
  

  <script src="preso_files/libs/revealjs/plugin/notes/notes.js"></script>
  <script src="preso_files/libs/revealjs/plugin/search/search.js"></script>
  <script src="preso_files/libs/revealjs/plugin/zoom/zoom.js"></script>
  <script src="preso_files/libs/revealjs/plugin/math/math.js"></script>
  <script>window.define = window.backupDefine; window.backupDefine = undefined;</script>

  <script>

      // Full list of configuration options available at:
      // https://revealjs.com/config/
      Reveal.initialize({
'controlsAuto': true,
'previewLinksAuto': false,
'pdfSeparateFragments': false,
'autoAnimateEasing': "ease",

quarto/preso_files/libs/revealjs/plugin/highlight/highlight.esm.js  view on Meta::CPAN

function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete...
/*!
 * reveal.js plugin that adds syntax highlight support.
 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...

quarto/preso_files/libs/revealjs/plugin/highlight/highlight.js  view on Meta::CPAN

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealHighlight=t()}(this,(function(){"use strict";function e...
/*!
	 * reveal.js plugin that adds syntax highlight support.
	 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...

share/libs/revealjs/plugin/highlight/highlight.esm.js  view on Meta::CPAN

function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete...
/*!
 * reveal.js plugin that adds syntax highlight support.
 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...

share/libs/revealjs/plugin/highlight/highlight.js  view on Meta::CPAN

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealHighlight=t()}(this,(function(){"use strict";function e...
/*!
	 * reveal.js plugin that adds syntax highlight support.
	 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...

share/templates/html/main.html  view on Meta::CPAN

  <body class="quarto-light">
    <div class="reveal">
      <div class="slides">
---SLIDES---
      </div>
      <div class="quarto-auto-generated-content" style="display: none;">
	<div class="footer footer-default">
	</div>
    </div></div>

    <script>window.backupDefine = window.define; window.define = undefined;</script>
    <script src="---SUBDIR---/libs/revealjs/dist/reveal.js"></script>
    <!-- reveal.js plugins -->
    <script src="---SUBDIR---/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
    <script src="---SUBDIR---/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
    <script src="---SUBDIR---/libs/revealjs/plugin/reveal-menu/menu.js"></script>
    <script src="---SUBDIR---/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
    <script src="---SUBDIR---/libs/revealjs/plugin/quarto-support/support.js"></script>
    

    <script src="---SUBDIR---/libs/revealjs/plugin/notes/notes.js"></script>
    <script src="---SUBDIR---/libs/revealjs/plugin/search/search.js"></script>
    <script src="---SUBDIR---/libs/revealjs/plugin/zoom/zoom.js"></script>
    <script src="---SUBDIR---/libs/revealjs/plugin/math/math.js"></script>
    <script>window.define = window.backupDefine; window.backupDefine = undefined;</script>

    <script>

      // Full list of configuration options available at:
      // https://revealjs.com/config/
      Reveal.initialize({
	  'controlsAuto': false,
	  'previewLinksAuto': false,
	  'pdfSeparateFragments': false,
	  'autoAnimateEasing': "ease",

t/02-bin/rvl/singleslide-no-anim.html.golden  view on Meta::CPAN

	 data-transition="none" data-background-transition="none">

</section>

      </div>
      <div class="quarto-auto-generated-content" style="display: none;">
	<div class="footer footer-default">
	</div>
    </div></div>

    <script>window.backupDefine = window.define; window.define = undefined;</script>
    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/dist/reveal.js"></script>
    <!-- reveal.js plugins -->
    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/plugin/quarto-support/support.js"></script>
    

    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/plugin/notes/notes.js"></script>
    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/plugin/search/search.js"></script>
    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/plugin/zoom/zoom.js"></script>
    <script src="t/02-bin/rvl/singleslide-no-anim_files/libs/revealjs/plugin/math/math.js"></script>
    <script>window.define = window.backupDefine; window.backupDefine = undefined;</script>

    <script>

      // Full list of configuration options available at:
      // https://revealjs.com/config/
      Reveal.initialize({
	  'controlsAuto': false,
	  'previewLinksAuto': false,
	  'pdfSeparateFragments': false,
	  'autoAnimateEasing': "ease",

test/2026-01-01-LVP/jo_files/libs/revealjs/plugin/highlight/highlight.esm.js  view on Meta::CPAN

function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete...
/*!
 * reveal.js plugin that adds syntax highlight support.
 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...

test/2026-01-01-LVP/jo_files/libs/revealjs/plugin/highlight/highlight.js  view on Meta::CPAN

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealHighlight=t()}(this,(function(){"use strict";function e...
/*!
	 * reveal.js plugin that adds syntax highlight support.
	 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...

test/2026-02-04-DRM/index.html  view on Meta::CPAN


<aside class="notes"> </aside>
</section>

      </div>
      <div class="quarto-auto-generated-content" style="display: none;">
	<div class="footer footer-default">
	</div>
    </div></div>

    <script>window.backupDefine = window.define; window.define = undefined;</script>
    <script src="the_shell_files/libs/revealjs/dist/reveal.js"></script>
    <!-- reveal.js plugins -->
    <script src="the_shell_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/quarto-support/support.js"></script>
    

    <script src="the_shell_files/libs/revealjs/plugin/notes/notes.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/search/search.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/zoom/zoom.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/math/math.js"></script>
    <script>window.define = window.backupDefine; window.backupDefine = undefined;</script>

    <script>

      // Full list of configuration options available at:
      // https://revealjs.com/config/
      Reveal.initialize({
	  'controlsAuto': false,
	  'previewLinksAuto': false,
	  'pdfSeparateFragments': false,
	  'autoAnimateEasing': "ease",

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.19.vrb  view on Meta::CPAN

\frametitle{File Manipulation Examples}
\begin{block}{Examples}
\begin{verbatim}
# Create nested directories
mkdir -p project/src/utils

# Copy a folder and all its contents
cp -r folder1 folder1_backup

# Rename a file
mv old_name.txt new_name.txt

# Remove a folder and its contents (be careful!)
rm -rf temporary_work
\end{verbatim}
\end{block}

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.38.vrb  view on Meta::CPAN

\frametitle{Time to Explore: Globbing}
\begin{block}{Files in Directory}
\texttt{img1.png}, \texttt{img10.png}, \texttt{img2.png}, \texttt{image.png}, \texttt{backup\_img1.png}
\end{block}
\begin{exampleblock}{Predict}\label{sec:org735de1c}
Which files match these patterns?
\begin{enumerate}
\item \texttt{img?.png}
\item \texttt{img*.png}
\item \texttt{img[1-9].png}
\item \texttt{*img1.png}
\end{enumerate}
\end{exampleblock}
\begin{alertblock}<2->{Answers}
\begin{enumerate}[<+->]
\item \texttt{img1.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{img10.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{backup\_img1.png}
\end{enumerate}
\end{alertblock}

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.58.vrb  view on Meta::CPAN

\frametitle{xargs: Usage and Options}
\begin{block}{Examples}
\begin{verbatim}
# Delete all .tmp files (safe with spaces)
find . -name "*.tmp" -print0 | xargs -0 rm

# Run 1 command per input line (NUL-delimited)
printf '%s\0' dir1 dir2 dir3 | xargs -0 -n 1 mkdir

# Custom placement of arguments (safe with spaces)
find . -maxdepth 1 -name "*.txt" -print0 | xargs -0 -I {} mv "{}" backup/
\end{verbatim}
\end{block}
\begin{exampleblock}<2->{Common Flags}\label{sec:org6389170}
\begin{center}
\begin{tabular}{ll}
Option & Description\\
\hline
\texttt{-n N} & Use at most N args per command\\
\texttt{-I \{\}} & Replace \{\} with the input string\\
\texttt{-0} & Read NUL-delimited input (safe)\\

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.76.vrb  view on Meta::CPAN

# Access: Use the $ sign
echo "Welcome to $name"

# Command Substitution: Use $()
current_user=$(whoami)
\end{verbatim}
\end{block}
\begin{alertblock}{Important Rules}
\begin{itemize}
\item \alert{Quotes Matter:} Use \texttt{"\$var"} to prevent word splitting if your variable contains spaces.
\item \alert{Braces:} Use \texttt{\$\{var\}} for clarity or when appending text: \texttt{echo "\$\{name\}\_backup"}.
\end{itemize}
\end{alertblock}

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.82.vrb  view on Meta::CPAN

\frametitle{Example: Auto-Backup}
\begin{block}{A Robust Backup Script}
\begin{verbatim}
#!/bin/bash
set -euo pipefail

DEST="/backups/$(date +%Y-%m-%d)"
mkdir -p "$DEST"

for dir in "$@"; do
  if [ -d "$dir" ]; then
    echo "Backing up $dir..."
    tar -czf "$DEST/$(basename "$dir").tar.gz" "$dir"
  else
    echo "Warning: $dir is not a directory" >&2
  fi
done

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.tex  view on Meta::CPAN

\end{itemize}
\end{alertblock}
\end{frame}
\begin{frame}[label={sec:org8fb515c},fragile]{File Manipulation Examples}
 \begin{block}{Examples}
\begin{verbatim}
# Create nested directories
mkdir -p project/src/utils

# Copy a folder and all its contents
cp -r folder1 folder1_backup

# Rename a file
mv old_name.txt new_name.txt

# Remove a folder and its contents (be careful!)
rm -rf temporary_work
\end{verbatim}
\end{block}
\end{frame}
\begin{frame}[label={sec:orgdc1b1a9},fragile]{Time to Explore: File Operations}

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.tex  view on Meta::CPAN

# Match any lowercase letter
ls [a-z]*.txt

# Negation: anything NOT starting with a-z
ls [!a-z]*
\end{verbatim}
\end{block}
\end{frame}
\begin{frame}[label={sec:org68bd5ca},fragile]{Time to Explore: Globbing}
 \begin{block}{Files in Directory}
\texttt{img1.png}, \texttt{img10.png}, \texttt{img2.png}, \texttt{image.png}, \texttt{backup\_img1.png}
\end{block}
\begin{exampleblock}{Predict}\label{sec:org735de1c}
Which files match these patterns?
\begin{enumerate}
\item \texttt{img?.png}
\item \texttt{img*.png}
\item \texttt{img[1-9].png}
\item \texttt{*img1.png}
\end{enumerate}
\end{exampleblock}
\begin{alertblock}<2->{Answers}
\begin{enumerate}[<+->]
\item \texttt{img1.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{img10.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{backup\_img1.png}
\end{enumerate}
\end{alertblock}
\end{frame}
\begin{frame}[label={sec:org1c4e493},fragile]{Brace Expansion}
 \begin{definition}[Creating Multiple Arguments]\label{sec:orgde064d7}
Brace expansion generates multiple strings from a pattern. Excellent for bulk creation.
\end{definition}
\begin{block}{Examples}
\begin{verbatim}
# Create multiple files at once

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.tex  view on Meta::CPAN

Command substitution allows you to use the output of a command as an argument to another command.
\end{definition}
\end{frame}
\begin{frame}[label={sec:org102bb11}]{Command Substitution Execution Order}
\begin{block}{How It Works}
\begin{center}
\begin{tikzpicture}[
    node distance=0.7cm,
    box/.style={rectangle, draw, thick, minimum width=7cm, minimum height=0.6cm, align=center, font=\small\ttfamily}
]
    \node[box, fill=blue!15] (original) {tar -czf backup-\$(date +\%Y\%m\%d).tar.gz files/};
    \node[box, fill=yellow!20, below=of original] (executed) {\$(date +\%Y\%m\%d) $\rightarrow$ "YYYYMMDD"};
    \node[box, fill=green!20, below=of executed] (final) {tar -czf backup-YYYYMMDD.tar.gz files/};

    \draw[->, very thick] (original) -- (executed);
    \draw[->, very thick] (executed) -- (final);
\end{tikzpicture}
\end{center}

Inner command executes → output replaces substitution → full command runs
\end{block}
\end{frame}
\begin{frame}[label={sec:org1a4be1f},fragile]{Command Substitution Examples}

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.tex  view on Meta::CPAN

\begin{frame}[label={sec:orge4edf8e},fragile]{xargs: Usage and Options}
 \begin{block}{Examples}
\begin{verbatim}
# Delete all .tmp files (safe with spaces)
find . -name "*.tmp" -print0 | xargs -0 rm

# Run 1 command per input line (NUL-delimited)
printf '%s\0' dir1 dir2 dir3 | xargs -0 -n 1 mkdir

# Custom placement of arguments (safe with spaces)
find . -maxdepth 1 -name "*.txt" -print0 | xargs -0 -I {} mv "{}" backup/
\end{verbatim}
\end{block}
\begin{exampleblock}<2->{Common Flags}\label{sec:org6389170}
\begin{center}
\begin{tabular}{ll}
Option & Description\\
\hline
\texttt{-n N} & Use at most N args per command\\
\texttt{-I \{\}} & Replace \{\} with the input string\\
\texttt{-0} & Read NUL-delimited input (safe)\\

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.tex  view on Meta::CPAN

# Access: Use the $ sign
echo "Welcome to $name"

# Command Substitution: Use $()
current_user=$(whoami)
\end{verbatim}
\end{block}
\begin{alertblock}{Important Rules}
\begin{itemize}
\item \alert{Quotes Matter:} Use \texttt{"\$var"} to prevent word splitting if your variable contains spaces.
\item \alert{Braces:} Use \texttt{\$\{var\}} for clarity or when appending text: \texttt{echo "\$\{name\}\_backup"}.
\end{itemize}
\end{alertblock}
\end{frame}
\begin{frame}[label={sec:orgea5b845},fragile]{Positional Arguments}
 \begin{block}{Communicating with Scripts}
\begin{center}
\begin{tabular}{ll}
Variable & Description\\
\hline
\texttt{\$0} & The script name itself\\

test/2026-02-04-DRM/the_shell-notes-5476C9D2-01A9-11F1-99C0-B718CF90B9A1.tex  view on Meta::CPAN

\item \alert{Answer:} Without \texttt{-u}, it runs \texttt{rm -rf /file}. With \texttt{-u}, the script exits immediately.
\end{enumerate}
\end{exampleblock}
\end{frame}
\begin{frame}[label={sec:orgd26e8ce},fragile]{Example: Auto-Backup}
 \begin{block}{A Robust Backup Script}
\begin{verbatim}
#!/bin/bash
set -euo pipefail

DEST="/backups/$(date +%Y-%m-%d)"
mkdir -p "$DEST"

for dir in "$@"; do
  if [ -d "$dir" ]; then
    echo "Backing up $dir..."
    tar -czf "$DEST/$(basename "$dir").tar.gz" "$dir"
  else
    echo "Warning: $dir is not a directory" >&2
  fi
done

test/2026-02-04-DRM/the_shell.19.vrb  view on Meta::CPAN

\frametitle{File Manipulation Examples}
\begin{block}{Examples}
\begin{verbatim}
# Create nested directories
mkdir -p project/src/utils

# Copy a folder and all its contents
cp -r folder1 folder1_backup

# Rename a file
mv old_name.txt new_name.txt

# Remove a folder and its contents (be careful!)
rm -rf temporary_work
\end{verbatim}
\end{block}

test/2026-02-04-DRM/the_shell.38.vrb  view on Meta::CPAN

\frametitle{Time to Explore: Globbing}
\begin{block}{Files in Directory}
\texttt{img1.png}, \texttt{img10.png}, \texttt{img2.png}, \texttt{image.png}, \texttt{backup\_img1.png}
\end{block}
\begin{exampleblock}{Predict}\label{sec:org735de1c}
Which files match these patterns?
\begin{enumerate}
\item \texttt{img?.png}
\item \texttt{img*.png}
\item \texttt{img[1-9].png}
\item \texttt{*img1.png}
\end{enumerate}
\end{exampleblock}
\begin{alertblock}<2->{Answers}
\begin{enumerate}[<+->]
\item \texttt{img1.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{img10.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{backup\_img1.png}
\end{enumerate}
\end{alertblock}

test/2026-02-04-DRM/the_shell.58.vrb  view on Meta::CPAN

\frametitle{xargs: Usage and Options}
\begin{block}{Examples}
\begin{verbatim}
# Delete all .tmp files (safe with spaces)
find . -name "*.tmp" -print0 | xargs -0 rm

# Run 1 command per input line (NUL-delimited)
printf '%s\0' dir1 dir2 dir3 | xargs -0 -n 1 mkdir

# Custom placement of arguments (safe with spaces)
find . -maxdepth 1 -name "*.txt" -print0 | xargs -0 -I {} mv "{}" backup/
\end{verbatim}
\end{block}
\begin{exampleblock}<2->{Common Flags}\label{sec:org6389170}
\begin{center}
\begin{tabular}{ll}
Option & Description\\
\hline
\texttt{-n N} & Use at most N args per command\\
\texttt{-I \{\}} & Replace \{\} with the input string\\
\texttt{-0} & Read NUL-delimited input (safe)\\

test/2026-02-04-DRM/the_shell.76.vrb  view on Meta::CPAN

# Access: Use the $ sign
echo "Welcome to $name"

# Command Substitution: Use $()
current_user=$(whoami)
\end{verbatim}
\end{block}
\begin{alertblock}{Important Rules}
\begin{itemize}
\item \alert{Quotes Matter:} Use \texttt{"\$var"} to prevent word splitting if your variable contains spaces.
\item \alert{Braces:} Use \texttt{\$\{var\}} for clarity or when appending text: \texttt{echo "\$\{name\}\_backup"}.
\end{itemize}
\end{alertblock}

test/2026-02-04-DRM/the_shell.82.vrb  view on Meta::CPAN

\frametitle{Example: Auto-Backup}
\begin{block}{A Robust Backup Script}
\begin{verbatim}
#!/bin/bash
set -euo pipefail

DEST="/backups/$(date +%Y-%m-%d)"
mkdir -p "$DEST"

for dir in "$@"; do
  if [ -d "$dir" ]; then
    echo "Backing up $dir..."
    tar -czf "$DEST/$(basename "$dir").tar.gz" "$dir"
  else
    echo "Warning: $dir is not a directory" >&2
  fi
done

test/2026-02-04-DRM/the_shell.html  view on Meta::CPAN


<aside class="notes"> </aside>
</section>

      </div>
      <div class="quarto-auto-generated-content" style="display: none;">
	<div class="footer footer-default">
	</div>
    </div></div>

    <script>window.backupDefine = window.define; window.define = undefined;</script>
    <script src="the_shell_files/libs/revealjs/dist/reveal.js"></script>
    <!-- reveal.js plugins -->
    <script src="the_shell_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/quarto-support/support.js"></script>
    

    <script src="the_shell_files/libs/revealjs/plugin/notes/notes.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/search/search.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/zoom/zoom.js"></script>
    <script src="the_shell_files/libs/revealjs/plugin/math/math.js"></script>
    <script>window.define = window.backupDefine; window.backupDefine = undefined;</script>

    <script>

      // Full list of configuration options available at:
      // https://revealjs.com/config/
      Reveal.initialize({
	  'controlsAuto': false,
	  'previewLinksAuto': false,
	  'pdfSeparateFragments': false,
	  'autoAnimateEasing': "ease",

test/2026-02-04-DRM/the_shell.tex  view on Meta::CPAN

\end{itemize}
\end{alertblock}
\end{frame}
\begin{frame}[label={sec:org8fb515c},fragile]{File Manipulation Examples}
 \begin{block}{Examples}
\begin{verbatim}
# Create nested directories
mkdir -p project/src/utils

# Copy a folder and all its contents
cp -r folder1 folder1_backup

# Rename a file
mv old_name.txt new_name.txt

# Remove a folder and its contents (be careful!)
rm -rf temporary_work
\end{verbatim}
\end{block}
\end{frame}
\begin{frame}[label={sec:orgdc1b1a9},fragile]{Time to Explore: File Operations}

test/2026-02-04-DRM/the_shell.tex  view on Meta::CPAN

# Match any lowercase letter
ls [a-z]*.txt

# Negation: anything NOT starting with a-z
ls [!a-z]*
\end{verbatim}
\end{block}
\end{frame}
\begin{frame}[label={sec:org68bd5ca},fragile]{Time to Explore: Globbing}
 \begin{block}{Files in Directory}
\texttt{img1.png}, \texttt{img10.png}, \texttt{img2.png}, \texttt{image.png}, \texttt{backup\_img1.png}
\end{block}
\begin{exampleblock}{Predict}\label{sec:org735de1c}
Which files match these patterns?
\begin{enumerate}
\item \texttt{img?.png}
\item \texttt{img*.png}
\item \texttt{img[1-9].png}
\item \texttt{*img1.png}
\end{enumerate}
\end{exampleblock}
\begin{alertblock}<2->{Answers}
\begin{enumerate}[<+->]
\item \texttt{img1.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{img10.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{img2.png}
\item \texttt{img1.png}, \texttt{backup\_img1.png}
\end{enumerate}
\end{alertblock}
\end{frame}
\begin{frame}[label={sec:org1c4e493},fragile]{Brace Expansion}
 \begin{definition}[Creating Multiple Arguments]\label{sec:orgde064d7}
Brace expansion generates multiple strings from a pattern. Excellent for bulk creation.
\end{definition}
\begin{block}{Examples}
\begin{verbatim}
# Create multiple files at once

test/2026-02-04-DRM/the_shell.tex  view on Meta::CPAN

Command substitution allows you to use the output of a command as an argument to another command.
\end{definition}
\end{frame}
\begin{frame}[label={sec:org102bb11}]{Command Substitution Execution Order}
\begin{block}{How It Works}
\begin{center}
\begin{tikzpicture}[
    node distance=0.7cm,
    box/.style={rectangle, draw, thick, minimum width=7cm, minimum height=0.6cm, align=center, font=\small\ttfamily}
]
    \node[box, fill=blue!15] (original) {tar -czf backup-\$(date +\%Y\%m\%d).tar.gz files/};
    \node[box, fill=yellow!20, below=of original] (executed) {\$(date +\%Y\%m\%d) $\rightarrow$ "YYYYMMDD"};
    \node[box, fill=green!20, below=of executed] (final) {tar -czf backup-YYYYMMDD.tar.gz files/};

    \draw[->, very thick] (original) -- (executed);
    \draw[->, very thick] (executed) -- (final);
\end{tikzpicture}
\end{center}

Inner command executes → output replaces substitution → full command runs
\end{block}
\end{frame}
\begin{frame}[label={sec:org1a4be1f},fragile]{Command Substitution Examples}

test/2026-02-04-DRM/the_shell.tex  view on Meta::CPAN

\begin{frame}[label={sec:orge4edf8e},fragile]{xargs: Usage and Options}
 \begin{block}{Examples}
\begin{verbatim}
# Delete all .tmp files (safe with spaces)
find . -name "*.tmp" -print0 | xargs -0 rm

# Run 1 command per input line (NUL-delimited)
printf '%s\0' dir1 dir2 dir3 | xargs -0 -n 1 mkdir

# Custom placement of arguments (safe with spaces)
find . -maxdepth 1 -name "*.txt" -print0 | xargs -0 -I {} mv "{}" backup/
\end{verbatim}
\end{block}
\begin{exampleblock}<2->{Common Flags}\label{sec:org6389170}
\begin{center}
\begin{tabular}{ll}
Option & Description\\
\hline
\texttt{-n N} & Use at most N args per command\\
\texttt{-I \{\}} & Replace \{\} with the input string\\
\texttt{-0} & Read NUL-delimited input (safe)\\

test/2026-02-04-DRM/the_shell.tex  view on Meta::CPAN

# Access: Use the $ sign
echo "Welcome to $name"

# Command Substitution: Use $()
current_user=$(whoami)
\end{verbatim}
\end{block}
\begin{alertblock}{Important Rules}
\begin{itemize}
\item \alert{Quotes Matter:} Use \texttt{"\$var"} to prevent word splitting if your variable contains spaces.
\item \alert{Braces:} Use \texttt{\$\{var\}} for clarity or when appending text: \texttt{echo "\$\{name\}\_backup"}.
\end{itemize}
\end{alertblock}
\end{frame}
\begin{frame}[label={sec:orgea5b845},fragile]{Positional Arguments}
 \begin{block}{Communicating with Scripts}
\begin{center}
\begin{tabular}{ll}
Variable & Description\\
\hline
\texttt{\$0} & The script name itself\\

test/2026-02-04-DRM/the_shell.tex  view on Meta::CPAN

\item \alert{Answer:} Without \texttt{-u}, it runs \texttt{rm -rf /file}. With \texttt{-u}, the script exits immediately.
\end{enumerate}
\end{exampleblock}
\end{frame}
\begin{frame}[label={sec:orgd26e8ce},fragile]{Example: Auto-Backup}
 \begin{block}{A Robust Backup Script}
\begin{verbatim}
#!/bin/bash
set -euo pipefail

DEST="/backups/$(date +%Y-%m-%d)"
mkdir -p "$DEST"

for dir in "$@"; do
  if [ -d "$dir" ]; then
    echo "Backing up $dir..."
    tar -czf "$DEST/$(basename "$dir").tar.gz" "$dir"
  else
    echo "Warning: $dir is not a directory" >&2
  fi
done

test/2026-02-04-DRM/the_shell_files/libs/revealjs/plugin/highlight/highlight.esm.js  view on Meta::CPAN

function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete...
/*!
 * reveal.js plugin that adds syntax highlight support.
 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...

test/2026-02-04-DRM/the_shell_files/libs/revealjs/plugin/highlight/highlight.js  view on Meta::CPAN

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealHighlight=t()}(this,(function(){"use strict";function e...
/*!
	 * reveal.js plugin that adds syntax highlight support.
	 */
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...



( run in 2.995 seconds using v1.01-cache-2.11-cpan-c966e8aa7e8 )