Browse Source

Set up infrastructure for lightweight history.

back-to-jekyll
hoschi-it 5 months ago
committed by hoschi-it
parent
commit
c6de80ce57
  1. 18
      build
  2. 240
      distribution/2021/03/09/exec-a-command-for-each-specific-file/index.html
  3. 25
      distribution/gemfeed/2021-03-17-goals.html
  4. 27
      distribution/gemfeed/atom.xml
  5. 1
      distribution/gemfeed/index.html
  6. 49
      distribution/history.html
  7. 2
      distribution/index.html
  8. 11
      gemtext/gemfeed/2021-03-17-goals.gmi
  9. 27
      gemtext/gemfeed/atom.xml
  10. 1
      gemtext/gemfeed/index.gmi
  11. 34
      gemtext/history.gmi
  12. 2
      gemtext/index.gmi
  13. 25
      html/gemfeed/2021-03-17-goals.html
  14. 27
      html/gemfeed/atom.xml
  15. 1
      html/gemfeed/index.html
  16. 49
      html/history.html
  17. 2
      html/index.html
  18. 240
      html_2021_jekyll-website_latest/2021/03/09/exec-a-command-for-each-specific-file/index.html
  19. 11
      md/gemfeed/2021-03-17-goals.md
  20. 1
      md/gemfeed/index.md
  21. 34
      md/history.md
  22. 2
      md/index.md
  23. 5
      meta/gemfeed/2021-03-17-goals.meta
  24. 3
      redirect.csv

18
build

@ -22,6 +22,23 @@ export CONFIG_FILE_PATH=$(echo $WorkingDirectory)/gemtexter.conf
set -o xtrace;
# `set -o xtrace`
# create index page for "historic" pages
OldSite=$( ls $WorkingDirectory/ | grep html_[0-9] )
if [[ -e $OldSite ]]; then
HistoryPage=gemtext/history.gmi
TmpFile=/tmp/history.txt
cd $OldSite
echo "# History" > $TmpFile
find . -type f -name '*.html' |
sed 's/^\.//' |
xargs -I % echo "=> % " >> $TmpFile
echo "This is the case"
cd $WorkingDirectory
cp $TmpFile $HistoryPage
else
echo "no way."
fi
cd ../gemtexter && \
./gemtexter --feed && \
./gemtexter --generate && \
@ -38,6 +55,7 @@ if [[ $IsUnderConstruction -ne 1 ]]; then
Files=$(echo $Files | tr ' ' '\n' | grep --invert-match "./html_under-construction")
fi
echo $Files |
tr ' ' '\n' |
xargs -I % rsync --recursive --verbose %/ $TargetFolder/

240
distribution/2021/03/09/exec-a-command-for-each-specific-file/index.html

@ -1,17 +1,241 @@
<!DOCTYPE html> <html lang="en"><head> <link href="http://gmpg.org/xfn/11" rel="profile" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <!-- Enable responsiveness on mobile devices--> <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=5" /> <!-- yandex search site submission code --> <meta name="yandex-verification" content="d9bed1f6e7422836" /> <!-- google search site submission code --> <meta name="google-site-verification" content="YQ5G_6dkyNio3G1OmGZV19NxdDLJU3fiqc7nzpn5J38" /> <title> Exec A Command For Each Specific File &middot; Hoschi-IT </title> <!-- CSS --> <link rel="stylesheet" href="/assets/css/main.css"/> <!-- Icons --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/apple-touch-icon-144-precomposed.png" /> <link rel="shortcut icon" href="/assets/favicon.ico" /> <!-- RSS --> <link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml" /> <link rel="authorization_endpoint" href="" /> <link rel="token_endpoint" href="" /> <link rel="microsub" href="" /><link rel="pgpkey authn" href='/key.pub' /> </head> <body class="theme-base-0d"><header> <section> <h1> <a href="/"> Hoschi-IT </a> </h1> <p class="lead"> Personal note book - feel free to explore! </p> <p class="lead"> </p> </section><nav> <ul><li> <a class="" href="/index.html">All posts</a> </li><li> <a class="" href="/about/">About</a> </li><li> <a class="" href="/tags/">Tags</a> </li></ul> </nav> <section class="social h-card"> <p style="display:none"> <a class="u-url u-uid p-nickname" rel="me" href="https://hoschi-it.de/">hoschi-it</a><img class="u-photo" alt="a kingfischer (bird)" src="/assets/photos/kingfisher.jpeg" height="100" width="100" /> </p> <ul> <li><a href="/key.pub" target="_blank" class="icon" rel="pgpkey authn" > <img src="/assets/icons/keys.svg" title="keys" alt="Keys" width="32" height="32" loading="lazy"/> </a> </li> <li><a href="https://mastodontech.de/@hoschi" target="_blank" class="icon" rel="me"> <img src="/assets/icons/mastodon.svg" title="mastodon" alt="Mastodon" width="32" height="32" loading="lazy"/> </a> </li> <li><a href="https://gitlab.com/hoschi-it" target="_blank" class="icon" rel="me"> <img src="/assets/icons/gitlab.svg" title="gitlab" alt="Gitlab" width="32" height="32" loading="lazy"/> </a> </li> <li><a href="https://stackoverflow.com/users/5129897/hoschi-it" target="_blank" class="icon" rel="me"> <img src="/assets/icons/stackoverflow.svg" title="stackoverflow" alt="Stackoverflow" width="32" height="32" loading="lazy"/> </a> </li> <li><a href="https://github.com/hoschi-it" target="_blank" class="icon" rel="me"> <img src="/assets/icons/github.svg" title="github" alt="Github" width="32" height="32" loading="lazy"/> </a> </li> </ul> </section> </header> <main class="content container"><article lang="en" class="post h-entry reply" > <a href="/2021/03/09/exec-a-command-for-each-specific-file/"> <time class="post-date dt-published" datetime="2021-03-09 21:27:30+0100">09 Mar 2021</time> </a><blockquote class="h-cite cite webmentions u-in-reply-to"><h4 class="p-name">Bash: Execute a command in each directory with file my_suites.cfg?</h4><section> "I want to create a script which executes a command (similar to make command) in every directory which contains a..." </section><p class="metadata"><span class="author p-author h-card">Phi-Long Vu </span>on <a class="u-url" href="https://unix.stackexchange.com/questions/638389/bash-execute-a-command-in-each-directory-with-file-my-suites-cfg" rel="nofollow" target="_blank">unix.stackexchange.com</a> at <time class="dt-published" datetime="2021-03-09 14:38:18+0000">09 Mar 2021</time></p> </blockquote> <div class="e-content p-name"><p>So to summarize the question: You want to run a bash command on each folder that contains a file that has a specific name, one at a time.</p> <p>Assuming, that you are willing to use existing tools and not write everything from scratch by yourself, here are some ideas:</p> <h2 id="tldr-too-long-didnt-read">TL;DR <em>(Too long, didn’t read)</em></h2> <p>If it doesn’t matter whether the newest files are not recognized yet:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ mlocate --basename --regex "^my_suites.cfg$" \
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=5" />
<title>Exec A Command For Each Specific File &middot; Hoschi-IT</title>
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml" />
</head>
<body class="theme-base-0d">
<main class="content container">
<article lang="en" class="post h-entry reply" >
<a href="/2021/03/09/exec-a-command-for-each-specific-file/">
<time class="post-date dt-published" datetime="2021-03-09 21:27:30+0100">09 Mar 2021
</time>
</a>
<blockquote class="h-cite cite webmentions u-in-reply-to">
<h4 class="p-name">Bash: Execute a command in each directory with file my_suites.cfg?
</h4>
<section> "I want to create a script which executes a command (similar to make command) in every directory which contains a..."
</section>
<p class="metadata">
<span class="author p-author h-card">Phi-Long Vu
</span>on
<a class="u-url" href="https://unix.stackexchange.com/questions/638389/bash-execute-a-command-in-each-directory-with-file-my-suites-cfg" rel="nofollow" target="_blank">unix.stackexchange.com
</a> at
<time class="dt-published" datetime="2021-03-09 14:38:18+0000">09 Mar 2021
</time>
</p>
</blockquote>
<div class="e-content p-name">
<p>So to summarize the question: You want to run a bash command on each folder that contains a file that has a specific name, one at a time.
</p>
<p>Assuming, that you are willing to use existing tools and not write everything from scratch by yourself, here are some ideas:
</p>
<h2 id="tldr-too-long-didnt-read">TL;DR
<em>(Too long, didn’t read)
</em>
</h2>
<p>If it doesn’t matter whether the newest files are not recognized yet:
</p>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ mlocate --basename --regex "^my_suites.cfg$" \
| xargs dirname \
| xargs -d '\n' &lt;command-to-run-on-the-file&gt;
</code></pre></div></div> <p>Else if efficiency is not so important (assuming, that we are searching recursively in the home directory (<code class="language-plaintext highlighter-rouge">~</code>) only:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ find ~ -name "my_suites.cfg" -type f \
</code>
</pre>
</div>
</div>
<p>Else if efficiency is not so important (assuming, that we are searching recursively in the home directory (
<code class="language-plaintext highlighter-rouge">~
</code>) only:
</p>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ find ~ -name "my_suites.cfg" -type f \
| xargs dirname \
| xargs -d '\n' &lt;command-to-run-on-the-file&gt;
</code></pre></div></div> <hr /> <h2 id="full-version">Full Version</h2> <h3 id="finding-the-files">Finding the files</h3> <p>If the files you are looking for are scattered all over the system, you should care about effectiveness.</p> <h4 id="the-faster-way">The fast(er) way</h4> <p>With some downsides</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ mlocate --basename --regex "^my_suites.cfg$"
</code></pre></div></div> <ul> <li><code class="language-plaintext highlighter-rouge">mlocate</code> looks up file paths in a database that is updated once a day for most distributions. So it may not recognize recently created or recently moved files. But because it looks into the database instead of going through the file system itself, it’s search is very efficient.</li> <li>The <code class="language-plaintext highlighter-rouge">--basename</code> option specifies that we are looking for the direct name of the file, not including the path/directories of it.</li> <li>The <code class="language-plaintext highlighter-rouge">--regex</code> option enables regular expressions being allowed in the search pattern. (The <code class="language-plaintext highlighter-rouge">^</code> expects the string to start there and the <code class="language-plaintext highlighter-rouge">$</code> expects the string to end there.)</li> </ul> <h4 id="the-always-up-to-date-way">The “always up-to-date” way</h4> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ find / -name "my_suites.cfg" -type f
</code></pre></div></div> <ul> <li><code class="language-plaintext highlighter-rouge">find</code> goes through basically every folder it can find and lists every file which is named my_suites.cfg. Because of that many reading-operations that it has to do, the more folders it searches the slower it gets.</li> <li>The <code class="language-plaintext highlighter-rouge">-name</code> option specifies, that my_suites.cfg is the <strong>name</strong> of the file, instead of i.e. a folder that contains the file that we are looking for.</li> <li>The <code class="language-plaintext highlighter-rouge">-type</code> option specifies, that we are looking for a <strong>file</strong>, not for a directory, symlink, socket or something.</li> </ul> <h3 id="running-a-custom-command-on-each-of-the-files">Running a custom command on each of the files</h3> <p>… that’s what <code class="language-plaintext highlighter-rouge">xargs</code> is for</p> <h4 id="a-simple-example">A simple example</h4> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ echo "some simple example" | xargs mkdir
</code>
</pre>
</div>
</div>
<hr />
<h2 id="full-version">Full Version
</h2>
<h3 id="finding-the-files">Finding the files
</h3>
<p>If the files you are looking for are scattered all over the system, you should care about effectiveness.
</p>
<h4 id="the-faster-way">The fast(er) way
</h4>
<p>With some downsides
</p>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ mlocate --basename --regex "^my_suites.cfg$"
</code>
</pre>
</div>
</div>
<ul>
<li>
<code class="language-plaintext highlighter-rouge">mlocate
</code> looks up file paths in a database that is updated once a day for most distributions. So it may not recognize recently created or recently moved files. But because it looks into the database instead of going through the file system itself, it’s search is very efficient.
</li>
<li>The
<code class="language-plaintext highlighter-rouge">--basename
</code> option specifies that we are looking for the direct name of the file, not including the path/directories of it.
</li>
<li>The
<code class="language-plaintext highlighter-rouge">--regex
</code> option enables regular expressions being allowed in the search pattern. (The
<code class="language-plaintext highlighter-rouge">^
</code> expects the string to start there and the
<code class="language-plaintext highlighter-rouge">$
</code> expects the string to end there.)
</li>
</ul>
<h4 id="the-always-up-to-date-way">The “always up-to-date” way
</h4>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ find / -name "my_suites.cfg" -type f
</code>
</pre>
</div>
</div>
<ul>
<li>
<code class="language-plaintext highlighter-rouge">find
</code> goes through basically every folder it can find and lists every file which is named my_suites.cfg. Because of that many reading-operations that it has to do, the more folders it searches the slower it gets.
</li>
<li>The
<code class="language-plaintext highlighter-rouge">-name
</code> option specifies, that my_suites.cfg is the
<strong>name
</strong> of the file, instead of i.e. a folder that contains the file that we are looking for.
</li>
<li>The
<code class="language-plaintext highlighter-rouge">-type
</code> option specifies, that we are looking for a
<strong>file
</strong>, not for a directory, symlink, socket or something.
</li>
</ul>
<h3 id="running-a-custom-command-on-each-of-the-files">Running a custom command on each of the files
</h3>
<p>… that’s what
<code class="language-plaintext highlighter-rouge">xargs
</code> is for
</p>
<h4 id="a-simple-example">A simple example
</h4>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ echo "some simple example" | xargs mkdir
$ # now there are three directories, named by the echoed words
$ ls
example simple some
</code></pre></div></div> <h4 id="something-more-complex">Something more complex:</h4> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ echo "hello world" | xargs -d ' ' -I % echo 'Print a word: %'
</code>
</pre>
</div>
</div>
<h4 id="something-more-complex">Something more complex:
</h4>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ echo "hello world" | xargs -d ' ' -I % echo 'Print a word: %'
Print a word: hello
Print a word: world
</code></pre></div></div> <ul> <li><code class="language-plaintext highlighter-rouge">-d</code> option: specifies, which character delimits the arguments from each other (here: a space).</li> <li><code class="language-plaintext highlighter-rouge">-I</code> option: All occurences of the given character (<code class="language-plaintext highlighter-rouge">%</code> in this example) will be replaced by the argument that came from the pipe (before <code class="language-plaintext highlighter-rouge">|</code>)</li> </ul> <p>This is what happens in the above example:</p> <ol> <li><code class="language-plaintext highlighter-rouge">echo</code> prints “hello world” to the standard output (<code class="language-plaintext highlighter-rouge">stdout</code>).</li> <li>The pipe (<code class="language-plaintext highlighter-rouge">|</code>) gives this value (“hello world”) to the following command, which happens to be <code class="language-plaintext highlighter-rouge">xargs</code>.</li> <li><code class="language-plaintext highlighter-rouge">xargs</code> searches for occurences of the delimiter in the argument and splits the argument where it finds the delimiter.</li> <li><code class="language-plaintext highlighter-rouge">xargs</code> loops through the newly created arguments and runs the command with the argument value instead of <code class="language-plaintext highlighter-rouge">%</code></li> </ol> <h3 id="further-readings">Further readings</h3> <ul> <li><a href="https://shapeshed.com/unix-xargs/">Unix xargs</a></li> <li><a href="https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285">Regular Expressions: Tutorial</a></li> <li><a href="https://linux.die.net/man/1/locate">locate man page</a></li> <li>this answer also lives on <a href="https://unix.stackexchange.com/a/638453/459894">unix.stackexchange.com</a></li> </ul> </div> <p><a class="p-category u-tag-of" href="/tags/#stackexchange" > #stackexchange</a> <a class="p-category u-tag-of" href="/tags/#bash" > #bash</a> <a class="p-category u-tag-of" href="/tags/#gnu/linux" > #gnu/linux</a> </p><details> <summary>Meta data</summary><ul class="microformats2"><li> Tags: <ul><li class="p-category"> <a href="https://hoschi-it.de/tags/#stackexchange">stackexchange</a> </li><li class="p-category"> <a href="https://hoschi-it.de/tags/#bash">bash</a> </li><li class="p-category"> <a href="https://hoschi-it.de/tags/#gnu/linux">gnu/linux</a> </li></ul> </li><li> <a class="u-url" href="https://hoschi-it.de/2021/03/09/exec-a-command-for-each-specific-file/"> Permanent post link </a> </li> <li class="p-author h-card" rel="author"> Author <ul> <li>Nickname: <span class="p-name">hoschi-it</span> </li> <li> <a class="u-url p-name" rel="author" href="https://hoschi-it.de/"> Website </a> </li> <li>Profile picture:<img class="u-photo" alt="a kingfischer (bird)" src="/assets/photos/kingfisher.jpeg" width="100" height="100" loading="lazy" /> </li> </ul> </li><li>Also published on <ul><li> <a rel="syndication" class="u-syndication" href="https://unix.stackexchange.com/a/638453/459894">unix.stackexchange.com</a> </li></ul> </li></ul> </details> </article> </main><footer><nav> <ul><li> <a class="" href="/impressum/">Impressum</a> </li><li> <a class="" href="/privacy/">Privacy</a> </li></ul> </nav> <p>&copy; 2021. All rights reserved.</p> </footer> </body> </html>
</code>
</pre>
</div>
</div>
<ul>
<li>
<code class="language-plaintext highlighter-rouge">-d
</code> option: specifies, which character delimits the arguments from each other (here: a space).
</li>
<li>
<code class="language-plaintext highlighter-rouge">-I
</code> option: All occurences of the given character (
<code class="language-plaintext highlighter-rouge">%
</code> in this example) will be replaced by the argument that came from the pipe (before
<code class="language-plaintext highlighter-rouge">|
</code>)
</li>
</ul>
<p>This is what happens in the above example:
</p>
<ol>
<li>
<code class="language-plaintext highlighter-rouge">echo
</code> prints “hello world” to the standard output (
<code class="language-plaintext highlighter-rouge">stdout
</code>).
</li>
<li>The pipe (
<code class="language-plaintext highlighter-rouge">|
</code>) gives this value (“hello world”) to the following command, which happens to be
<code class="language-plaintext highlighter-rouge">xargs
</code>.
</li>
<li>
<code class="language-plaintext highlighter-rouge">xargs
</code> searches for occurences of the delimiter in the argument and splits the argument where it finds the delimiter.
</li>
<li>
<code class="language-plaintext highlighter-rouge">xargs
</code> loops through the newly created arguments and runs the command with the argument value instead of
<code class="language-plaintext highlighter-rouge">%
</code>
</li>
</ol>
<h3 id="further-readings">Further readings
</h3>
<ul>
<li>
<a href="https://shapeshed.com/unix-xargs/">Unix xargs
</a>
</li>
<li>
<a href="https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285">Regular Expressions: Tutorial
</a>
</li>
<li>
<a href="https://linux.die.net/man/1/locate">locate man page
</a>
</li>
<li>this answer also lives on
<a href="https://unix.stackexchange.com/a/638453/459894">unix.stackexchange.com
</a>
</li>
</ul>
</div>
<p>
<a class="p-category u-tag-of" href="/tags/#stackexchange" > #stackexchange
</a>
<a class="p-category u-tag-of" href="/tags/#bash" > #bash
</a>
<a class="p-category u-tag-of" href="/tags/#gnu/linux" > #gnu/linux
</a>
</p>
</article>
</main>
</body>
</html>

25
distribution/gemfeed/2021-03-17-goals.html

@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Goals</title>
<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/assets/style.css" />
</head>
<body>
<h1>Goals</h1>
<p>Here are some things about the webpage (or my tech stack in general) that I want to accomplish:</p>
<ul>
<li>☐ Fix: Jekyll plugin does not find outgoing webmentions</li>
<li>☐ Wikify myself @indiewebcamp.org</li>
<li>☑ Relax</li>
<li>☐ Implement check lists (for real, not just via some specially formatted note post).</li>
<li>☐ put it on the IPFS, just for fun :D</li>
<li>☐ make publishing from mobile possible (via micropub)</li>
<li>☐ generate seperate h-feed and link to it</li>
<footer>
<a class="textlink" href="/">Go back home</a>
</footer>
</body>
</html>

27
distribution/gemfeed/atom.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<updated>2022-03-13T13:00:18+01:00</updated>
<updated>2022-03-17T18:40:36+01:00</updated>
<title>hoschi-it.de feed</title>
<subtitle>Live like you are loved.</subtitle>
<link href="https://hoschi-it.de/gemfeed/atom.xml" rel="self" />
@ -24,6 +24,31 @@
</div>
</content>
</entry>
<entry>
<title>Goals</title>
<link href="https://hoschi-it.de/gemfeed/2021-03-17-goals.html" />
<id>https://hoschi-it.de/gemfeed/2021-03-17-goals.html</id>
<updated>2021-03-17T18:39:11+01:00</updated>
<author>
<name>hoschi-it</name>
<email>me@hoschi-it.de</email>
</author>
<summary>. .....to read on please visit my site.</summary>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Goals</h1>
<p>Here are some things about the webpage (or my tech stack in general) that I want to accomplish:</p>
<ul>
<li>☐ Fix: Jekyll plugin does not find outgoing webmentions</li>
<li>☐ Wikify myself @indiewebcamp.org</li>
<li>☑ Relax</li>
<li>☐ Implement check lists (for real, not just via some specially formatted note post).</li>
<li>☐ put it on the IPFS, just for fun :D</li>
<li>☐ make publishing from mobile possible (via micropub)</li>
<li>☐ generate seperate h-feed and link to it</li>
</div>
</content>
</entry>
<entry>
<title>A staging area for my website</title>
<link href="https://hoschi-it.de/gemfeed/2020-12-29-staging-subdomain.html" />

1
distribution/gemfeed/index.html

@ -11,6 +11,7 @@
<h1>hoschi-it.de's Gemfeed</h1>
<h2>Live like you are loved.</h2>
<a class="textlink" href="./2022-03-13-why-does-this-website-look-so-old.html">2022-03-13 (0102 words) - Why does this website look so old?</a><br />
<a class="textlink" href="./2021-03-17-goals.html">2021-03-17 (0082 words) - Goals</a><br />
<a class="textlink" href="./2020-12-29-staging-subdomain.html">2020-12-29 (0204 words) - A staging area for my website</a><br />
<a class="textlink" href="./2020-12-28-sending-your-first-webmention.html">2020-12-28 (0076 words) - Thanks @aaronpk</a><br />
<a class="textlink" href="./2020-12-27-indieweb.html">2020-12-27 (0343 words) - 2021 and the IndieWeb</a><br />

49
distribution/history.html

@ -0,0 +1,49 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>History</title>
<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/assets/style.css" />
</head>
<body>
<h1>History</h1>
<a class="textlink" href="/projects/ducks-landing-page/index.html">/projects/ducks-landing-page/index.html</a><br />
<a class="textlink" href="/404.html">/404.html</a><br />
<a class="textlink" href="/privacy/index.html">/privacy/index.html</a><br />
<a class="textlink" href="/2021/01/02/danke/index.html">/2021/01/02/danke/index.html</a><br />
<a class="textlink" href="/2021/01/05/cli-anwendungen/index.html">/2021/01/05/cli-anwendungen/index.html</a><br />
<a class="textlink" href="/2021/01/05/covid19-musical-vaccine/index.html">/2021/01/05/covid19-musical-vaccine/index.html</a><br />
<a class="textlink" href="/2021/01/06/kein-parser-im-hirn/index.html">/2021/01/06/kein-parser-im-hirn/index.html</a><br />
<a class="textlink" href="/2021/03/17/goals/index.html">/2021/03/17/goals/index.html</a><br />
<a class="textlink" href="/2021/03/17/reply-1/index.html">/2021/03/17/reply-1/index.html</a><br />
<a class="textlink" href="/2021/03/07/bookmark-12-factor-app/index.html">/2021/03/07/bookmark-12-factor-app/index.html</a><br />
<a class="textlink" href="/2021/03/07/indieweb-internetarchive-channel/index.html">/2021/03/07/indieweb-internetarchive-channel/index.html</a><br />
<a class="textlink" href="/2021/03/07/bookmark-resilient-web-design/index.html">/2021/03/07/bookmark-resilient-web-design/index.html</a><br />
<a class="textlink" href="/2021/03/10/rsvp-hwc-europe/index.html">/2021/03/10/rsvp-hwc-europe/index.html</a><br />
<a class="textlink" href="/2021/03/10/bookmark-markdown-syntax-documentation/index.html">/2021/03/10/bookmark-markdown-syntax-documentation/index.html</a><br />
<a class="textlink" href="/2021/03/15/completed-tutorials/index.html">/2021/03/15/completed-tutorials/index.html</a><br />
<a class="textlink" href="/2021/03/09/exec-a-command-for-each-specific-file/index.html">/2021/03/09/exec-a-command-for-each-specific-file/index.html</a><br />
<a class="textlink" href="/2021/03/14/note-test/index.html">/2021/03/14/note-test/index.html</a><br />
<a class="textlink" href="/2021/03/14/plain-note-post-type/index.html">/2021/03/14/plain-note-post-type/index.html</a><br />
<a class="textlink" href="/2021/03/16/like-one-year-in-the-indieweb/index.html">/2021/03/16/like-one-year-in-the-indieweb/index.html</a><br />
<a class="textlink" href="/2021/03/16/bookmark-man-gnu-coreutils/index.html">/2021/03/16/bookmark-man-gnu-coreutils/index.html</a><br />
<a class="textlink" href="/2021/03/12/bookmark-indiewebxyz/index.html">/2021/03/12/bookmark-indiewebxyz/index.html</a><br />
<a class="textlink" href="/2021/03/12/like-non-technical-indieweb/index.html">/2021/03/12/like-non-technical-indieweb/index.html</a><br />
<a class="textlink" href="/2021/03/11/repost-messenger-ausweispflicht/index.html">/2021/03/11/repost-messenger-ausweispflicht/index.html</a><br />
<a class="textlink" href="/2021/03/11/like-what-matters/index.html">/2021/03/11/like-what-matters/index.html</a><br />
<a class="textlink" href="/2021/03/20/note-ipfs-publish/index.html">/2021/03/20/note-ipfs-publish/index.html</a><br />
<a class="textlink" href="/2021/03/13/bookmark-fedbridgy/index.html">/2021/03/13/bookmark-fedbridgy/index.html</a><br />
<a class="textlink" href="/a/deleted/post.html">/a/deleted/post.html</a><br />
<a class="textlink" href="/about/index.html">/about/index.html</a><br />
<a class="textlink" href="/tags/index.html">/tags/index.html</a><br />
<a class="textlink" href="/410.html">/410.html</a><br />
<a class="textlink" href="/replies/2020/2020-12-28-sending-your-first-webmention/index.html">/replies/2020/2020-12-28-sending-your-first-webmention/index.html</a><br />
<a class="textlink" href="/s/1/index.html">/s/1/index.html</a><br />
<a class="textlink" href="/2020/01/01/lets-start/index.html">/2020/01/01/lets-start/index.html</a><br />
<footer>
<a class="textlink" href="/">Go back home</a>
</footer>
</body>
</html>

2
distribution/index.html

@ -16,9 +16,11 @@
<p>I have been switching back and forth between multiple content management systems, blog engines and static site generators as well as linux distributions and systems for personal organisation. It's not really been very productive thus far, but I've had much fun.</p>
<a class="textlink" href="./contact-information.html">Contact information</a><br />
<a class="textlink" href="./resources.html">Resources that made an impact on me</a><br />
<a class="textlink" href="./history.html">Posts to be migrated</a><br />
<a class="textlink" href="./gemfeed/atom.xml">Atom feed for my posts</a><br />
<h2>Posts</h2>
<a class="textlink" href="./gemfeed/2022-03-13-why-does-this-website-look-so-old.html">2022-03-13 - Why does this website look so old?</a><br />
<a class="textlink" href="./gemfeed/2021-03-17-goals.html">2021-03-17 - Goals</a><br />
<a class="textlink" href="./gemfeed/2020-12-29-staging-subdomain.html">2020-12-29 - A staging area for my website</a><br />
<a class="textlink" href="./gemfeed/2020-12-28-sending-your-first-webmention.html">2020-12-28 - Thanks @aaronpk</a><br />
<a class="textlink" href="./gemfeed/2020-12-27-indieweb.html">2020-12-27 - 2021 and the IndieWeb</a><br />

11
gemtext/gemfeed/2021-03-17-goals.gmi

@ -0,0 +1,11 @@
# Goals
Here are some things about the webpage (or my tech stack in general) that I want to accomplish:
* ☐ Fix: Jekyll plugin does not find outgoing webmentions
* ☐ Wikify myself @indiewebcamp.org
* ☑ Relax
* ☐ Implement check lists (for real, not just via some specially formatted note post).
* ☐ put it on the IPFS, just for fun :D
* ☐ make publishing from mobile possible (via micropub)
* ☐ generate seperate h-feed and link to it

27
gemtext/gemfeed/atom.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<updated>2022-03-13T13:00:18+01:00</updated>
<updated>2022-03-17T18:40:36+01:00</updated>
<title>hoschi-it.de feed</title>
<subtitle>Live like you are loved.</subtitle>
<link href="gemini://hoschi-it.de/gemfeed/atom.xml" rel="self" />
@ -24,6 +24,31 @@
</div>
</content>
</entry>
<entry>
<title>Goals</title>
<link href="gemini://hoschi-it.de/gemfeed/2021-03-17-goals.gmi" />
<id>gemini://hoschi-it.de/gemfeed/2021-03-17-goals.gmi</id>
<updated>2021-03-17T18:39:11+01:00</updated>
<author>
<name>hoschi-it</name>
<email>me@hoschi-it.de</email>
</author>
<summary>. .....to read on please visit my site.</summary>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Goals</h1>
<p>Here are some things about the webpage (or my tech stack in general) that I want to accomplish:</p>
<ul>
<li>☐ Fix: Jekyll plugin does not find outgoing webmentions</li>
<li>☐ Wikify myself @indiewebcamp.org</li>
<li>☑ Relax</li>
<li>☐ Implement check lists (for real, not just via some specially formatted note post).</li>
<li>☐ put it on the IPFS, just for fun :D</li>
<li>☐ make publishing from mobile possible (via micropub)</li>
<li>☐ generate seperate h-feed and link to it</li>
</div>
</content>
</entry>
<entry>
<title>A staging area for my website</title>
<link href="gemini://hoschi-it.de/gemfeed/2020-12-29-staging-subdomain.gmi" />

1
gemtext/gemfeed/index.gmi

@ -3,6 +3,7 @@
## Live like you are loved.
=> ./2022-03-13-why-does-this-website-look-so-old.gmi 2022-03-13 (0102 words) - Why does this website look so old?
=> ./2021-03-17-goals.gmi 2021-03-17 (0082 words) - Goals
=> ./2020-12-29-staging-subdomain.gmi 2020-12-29 (0204 words) - A staging area for my website
=> ./2020-12-28-sending-your-first-webmention.gmi 2020-12-28 (0076 words) - Thanks @aaronpk
=> ./2020-12-27-indieweb.gmi 2020-12-27 (0343 words) - 2021 and the IndieWeb

34
gemtext/history.gmi

@ -0,0 +1,34 @@
# History
=> /projects/ducks-landing-page/index.html
=> /404.html
=> /privacy/index.html
=> /2021/01/02/danke/index.html
=> /2021/01/05/cli-anwendungen/index.html
=> /2021/01/05/covid19-musical-vaccine/index.html
=> /2021/01/06/kein-parser-im-hirn/index.html
=> /2021/03/17/goals/index.html
=> /2021/03/17/reply-1/index.html
=> /2021/03/07/bookmark-12-factor-app/index.html
=> /2021/03/07/indieweb-internetarchive-channel/index.html
=> /2021/03/07/bookmark-resilient-web-design/index.html
=> /2021/03/10/rsvp-hwc-europe/index.html
=> /2021/03/10/bookmark-markdown-syntax-documentation/index.html
=> /2021/03/15/completed-tutorials/index.html
=> /2021/03/09/exec-a-command-for-each-specific-file/index.html
=> /2021/03/14/note-test/index.html
=> /2021/03/14/plain-note-post-type/index.html
=> /2021/03/16/like-one-year-in-the-indieweb/index.html
=> /2021/03/16/bookmark-man-gnu-coreutils/index.html
=> /2021/03/12/bookmark-indiewebxyz/index.html
=> /2021/03/12/like-non-technical-indieweb/index.html
=> /2021/03/11/repost-messenger-ausweispflicht/index.html
=> /2021/03/11/like-what-matters/index.html
=> /2021/03/20/note-ipfs-publish/index.html
=> /2021/03/13/bookmark-fedbridgy/index.html
=> /a/deleted/post.html
=> /about/index.html
=> /tags/index.html
=> /410.html
=> /replies/2020/2020-12-28-sending-your-first-webmention/index.html
=> /s/1/index.html
=> /2020/01/01/lets-start/index.html

2
gemtext/index.gmi

@ -11,10 +11,12 @@ I have been switching back and forth between multiple content management systems
=> ./contact-information.gmi Contact information
=> ./resources.gmi Resources that made an impact on me
=> ./history.gmi Posts to be migrated
=> ./gemfeed/atom.xml Atom feed for my posts
## Posts
=> ./gemfeed/2022-03-13-why-does-this-website-look-so-old.gmi 2022-03-13 - Why does this website look so old?
=> ./gemfeed/2021-03-17-goals.gmi 2021-03-17 - Goals
=> ./gemfeed/2020-12-29-staging-subdomain.gmi 2020-12-29 - A staging area for my website
=> ./gemfeed/2020-12-28-sending-your-first-webmention.gmi 2020-12-28 - Thanks @aaronpk
=> ./gemfeed/2020-12-27-indieweb.gmi 2020-12-27 - 2021 and the IndieWeb

25
html/gemfeed/2021-03-17-goals.html

@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Goals</title>
<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/assets/style.css" />
</head>
<body>
<h1>Goals</h1>
<p>Here are some things about the webpage (or my tech stack in general) that I want to accomplish:</p>
<ul>
<li>☐ Fix: Jekyll plugin does not find outgoing webmentions</li>
<li>☐ Wikify myself @indiewebcamp.org</li>
<li>☑ Relax</li>
<li>☐ Implement check lists (for real, not just via some specially formatted note post).</li>
<li>☐ put it on the IPFS, just for fun :D</li>
<li>☐ make publishing from mobile possible (via micropub)</li>
<li>☐ generate seperate h-feed and link to it</li>
<footer>
<a class="textlink" href="/">Go back home</a>
</footer>
</body>
</html>

27
html/gemfeed/atom.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<updated>2022-03-13T13:00:18+01:00</updated>
<updated>2022-03-17T18:40:36+01:00</updated>
<title>hoschi-it.de feed</title>
<subtitle>Live like you are loved.</subtitle>
<link href="https://hoschi-it.de/gemfeed/atom.xml" rel="self" />
@ -24,6 +24,31 @@
</div>
</content>
</entry>
<entry>
<title>Goals</title>
<link href="https://hoschi-it.de/gemfeed/2021-03-17-goals.html" />
<id>https://hoschi-it.de/gemfeed/2021-03-17-goals.html</id>
<updated>2021-03-17T18:39:11+01:00</updated>
<author>
<name>hoschi-it</name>
<email>me@hoschi-it.de</email>
</author>
<summary>. .....to read on please visit my site.</summary>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Goals</h1>
<p>Here are some things about the webpage (or my tech stack in general) that I want to accomplish:</p>
<ul>
<li>☐ Fix: Jekyll plugin does not find outgoing webmentions</li>
<li>☐ Wikify myself @indiewebcamp.org</li>
<li>☑ Relax</li>
<li>☐ Implement check lists (for real, not just via some specially formatted note post).</li>
<li>☐ put it on the IPFS, just for fun :D</li>
<li>☐ make publishing from mobile possible (via micropub)</li>
<li>☐ generate seperate h-feed and link to it</li>
</div>
</content>
</entry>
<entry>
<title>A staging area for my website</title>
<link href="https://hoschi-it.de/gemfeed/2020-12-29-staging-subdomain.html" />

1
html/gemfeed/index.html

@ -11,6 +11,7 @@
<h1>hoschi-it.de's Gemfeed</h1>
<h2>Live like you are loved.</h2>
<a class="textlink" href="./2022-03-13-why-does-this-website-look-so-old.html">2022-03-13 (0102 words) - Why does this website look so old?</a><br />
<a class="textlink" href="./2021-03-17-goals.html">2021-03-17 (0082 words) - Goals</a><br />
<a class="textlink" href="./2020-12-29-staging-subdomain.html">2020-12-29 (0204 words) - A staging area for my website</a><br />
<a class="textlink" href="./2020-12-28-sending-your-first-webmention.html">2020-12-28 (0076 words) - Thanks @aaronpk</a><br />
<a class="textlink" href="./2020-12-27-indieweb.html">2020-12-27 (0343 words) - 2021 and the IndieWeb</a><br />

49
html/history.html

@ -0,0 +1,49 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>History</title>
<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/assets/style.css" />
</head>
<body>
<h1>History</h1>
<a class="textlink" href="/projects/ducks-landing-page/index.html">/projects/ducks-landing-page/index.html</a><br />
<a class="textlink" href="/404.html">/404.html</a><br />
<a class="textlink" href="/privacy/index.html">/privacy/index.html</a><br />
<a class="textlink" href="/2021/01/02/danke/index.html">/2021/01/02/danke/index.html</a><br />
<a class="textlink" href="/2021/01/05/cli-anwendungen/index.html">/2021/01/05/cli-anwendungen/index.html</a><br />
<a class="textlink" href="/2021/01/05/covid19-musical-vaccine/index.html">/2021/01/05/covid19-musical-vaccine/index.html</a><br />
<a class="textlink" href="/2021/01/06/kein-parser-im-hirn/index.html">/2021/01/06/kein-parser-im-hirn/index.html</a><br />
<a class="textlink" href="/2021/03/17/goals/index.html">/2021/03/17/goals/index.html</a><br />
<a class="textlink" href="/2021/03/17/reply-1/index.html">/2021/03/17/reply-1/index.html</a><br />
<a class="textlink" href="/2021/03/07/bookmark-12-factor-app/index.html">/2021/03/07/bookmark-12-factor-app/index.html</a><br />
<a class="textlink" href="/2021/03/07/indieweb-internetarchive-channel/index.html">/2021/03/07/indieweb-internetarchive-channel/index.html</a><br />
<a class="textlink" href="/2021/03/07/bookmark-resilient-web-design/index.html">/2021/03/07/bookmark-resilient-web-design/index.html</a><br />
<a class="textlink" href="/2021/03/10/rsvp-hwc-europe/index.html">/2021/03/10/rsvp-hwc-europe/index.html</a><br />
<a class="textlink" href="/2021/03/10/bookmark-markdown-syntax-documentation/index.html">/2021/03/10/bookmark-markdown-syntax-documentation/index.html</a><br />
<a class="textlink" href="/2021/03/15/completed-tutorials/index.html">/2021/03/15/completed-tutorials/index.html</a><br />
<a class="textlink" href="/2021/03/09/exec-a-command-for-each-specific-file/index.html">/2021/03/09/exec-a-command-for-each-specific-file/index.html</a><br />
<a class="textlink" href="/2021/03/14/note-test/index.html">/2021/03/14/note-test/index.html</a><br />
<a class="textlink" href="/2021/03/14/plain-note-post-type/index.html">/2021/03/14/plain-note-post-type/index.html</a><br />
<a class="textlink" href="/2021/03/16/like-one-year-in-the-indieweb/index.html">/2021/03/16/like-one-year-in-the-indieweb/index.html</a><br />
<a class="textlink" href="/2021/03/16/bookmark-man-gnu-coreutils/index.html">/2021/03/16/bookmark-man-gnu-coreutils/index.html</a><br />
<a class="textlink" href="/2021/03/12/bookmark-indiewebxyz/index.html">/2021/03/12/bookmark-indiewebxyz/index.html</a><br />
<a class="textlink" href="/2021/03/12/like-non-technical-indieweb/index.html">/2021/03/12/like-non-technical-indieweb/index.html</a><br />
<a class="textlink" href="/2021/03/11/repost-messenger-ausweispflicht/index.html">/2021/03/11/repost-messenger-ausweispflicht/index.html</a><br />
<a class="textlink" href="/2021/03/11/like-what-matters/index.html">/2021/03/11/like-what-matters/index.html</a><br />
<a class="textlink" href="/2021/03/20/note-ipfs-publish/index.html">/2021/03/20/note-ipfs-publish/index.html</a><br />
<a class="textlink" href="/2021/03/13/bookmark-fedbridgy/index.html">/2021/03/13/bookmark-fedbridgy/index.html</a><br />
<a class="textlink" href="/a/deleted/post.html">/a/deleted/post.html</a><br />
<a class="textlink" href="/about/index.html">/about/index.html</a><br />
<a class="textlink" href="/tags/index.html">/tags/index.html</a><br />
<a class="textlink" href="/410.html">/410.html</a><br />
<a class="textlink" href="/replies/2020/2020-12-28-sending-your-first-webmention/index.html">/replies/2020/2020-12-28-sending-your-first-webmention/index.html</a><br />
<a class="textlink" href="/s/1/index.html">/s/1/index.html</a><br />
<a class="textlink" href="/2020/01/01/lets-start/index.html">/2020/01/01/lets-start/index.html</a><br />
<footer>
<a class="textlink" href="/">Go back home</a>
</footer>
</body>
</html>

2
html/index.html

@ -16,9 +16,11 @@
<p>I have been switching back and forth between multiple content management systems, blog engines and static site generators as well as linux distributions and systems for personal organisation. It's not really been very productive thus far, but I've had much fun.</p>
<a class="textlink" href="./contact-information.html">Contact information</a><br />
<a class="textlink" href="./resources.html">Resources that made an impact on me</a><br />
<a class="textlink" href="./history.html">Posts to be migrated</a><br />
<a class="textlink" href="./gemfeed/atom.xml">Atom feed for my posts</a><br />
<h2>Posts</h2>
<a class="textlink" href="./gemfeed/2022-03-13-why-does-this-website-look-so-old.html">2022-03-13 - Why does this website look so old?</a><br />
<a class="textlink" href="./gemfeed/2021-03-17-goals.html">2021-03-17 - Goals</a><br />
<a class="textlink" href="./gemfeed/2020-12-29-staging-subdomain.html">2020-12-29 - A staging area for my website</a><br />
<a class="textlink" href="./gemfeed/2020-12-28-sending-your-first-webmention.html">2020-12-28 - Thanks @aaronpk</a><br />
<a class="textlink" href="./gemfeed/2020-12-27-indieweb.html">2020-12-27 - 2021 and the IndieWeb</a><br />

240
html_2021_jekyll-website_latest/2021/03/09/exec-a-command-for-each-specific-file/index.html

@ -1,17 +1,241 @@
<!DOCTYPE html> <html lang="en"><head> <link href="http://gmpg.org/xfn/11" rel="profile" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <!-- Enable responsiveness on mobile devices--> <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=5" /> <!-- yandex search site submission code --> <meta name="yandex-verification" content="d9bed1f6e7422836" /> <!-- google search site submission code --> <meta name="google-site-verification" content="YQ5G_6dkyNio3G1OmGZV19NxdDLJU3fiqc7nzpn5J38" /> <title> Exec A Command For Each Specific File &middot; Hoschi-IT </title> <!-- CSS --> <link rel="stylesheet" href="/assets/css/main.css"/> <!-- Icons --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/apple-touch-icon-144-precomposed.png" /> <link rel="shortcut icon" href="/assets/favicon.ico" /> <!-- RSS --> <link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml" /> <link rel="authorization_endpoint" href="" /> <link rel="token_endpoint" href="" /> <link rel="microsub" href="" /><link rel="pgpkey authn" href='/key.pub' /> </head> <body class="theme-base-0d"><header> <section> <h1> <a href="/"> Hoschi-IT </a> </h1> <p class="lead"> Personal note book - feel free to explore! </p> <p class="lead"> </p> </section><nav> <ul><li> <a class="" href="/index.html">All posts</a> </li><li> <a class="" href="/about/">About</a> </li><li> <a class="" href="/tags/">Tags</a> </li></ul> </nav> <section class="social h-card"> <p style="display:none"> <a class="u-url u-uid p-nickname" rel="me" href="https://hoschi-it.de/">hoschi-it</a><img class="u-photo" alt="a kingfischer (bird)" src="/assets/photos/kingfisher.jpeg" height="100" width="100" /> </p> <ul> <li><a href="/key.pub" target="_blank" class="icon" rel="pgpkey authn" > <img src="/assets/icons/keys.svg" title="keys" alt="Keys" width="32" height="32" loading="lazy"/> </a> </li> <li><a href="https://mastodontech.de/@hoschi" target="_blank" class="icon" rel="me"> <img src="/assets/icons/mastodon.svg" title="mastodon" alt="Mastodon" width="32" height="32" loading="lazy"/> </a> </li> <li><a href="https://gitlab.com/hoschi-it" target="_blank" class="icon" rel="me"> <img src="/assets/icons/gitlab.svg" title="gitlab" alt="Gitlab" width="32" height="32" loading="lazy"/> </a> </li> <li><a href="https://stackoverflow.com/users/5129897/hoschi-it" target="_blank" class="icon" rel="me"> <img src="/assets/icons/stackoverflow.svg" title="stackoverflow" alt="Stackoverflow" width="32" height="32" loading="lazy"/> </a> </li> <li><a href="https://github.com/hoschi-it" target="_blank" class="icon" rel="me"> <img src="/assets/icons/github.svg" title="github" alt="Github" width="32" height="32" loading="lazy"/> </a> </li> </ul> </section> </header> <main class="content container"><article lang="en" class="post h-entry reply" > <a href="/2021/03/09/exec-a-command-for-each-specific-file/"> <time class="post-date dt-published" datetime="2021-03-09 21:27:30+0100">09 Mar 2021</time> </a><blockquote class="h-cite cite webmentions u-in-reply-to"><h4 class="p-name">Bash: Execute a command in each directory with file my_suites.cfg?</h4><section> "I want to create a script which executes a command (similar to make command) in every directory which contains a..." </section><p class="metadata"><span class="author p-author h-card">Phi-Long Vu </span>on <a class="u-url" href="https://unix.stackexchange.com/questions/638389/bash-execute-a-command-in-each-directory-with-file-my-suites-cfg" rel="nofollow" target="_blank">unix.stackexchange.com</a> at <time class="dt-published" datetime="2021-03-09 14:38:18+0000">09 Mar 2021</time></p> </blockquote> <div class="e-content p-name"><p>So to summarize the question: You want to run a bash command on each folder that contains a file that has a specific name, one at a time.</p> <p>Assuming, that you are willing to use existing tools and not write everything from scratch by yourself, here are some ideas:</p> <h2 id="tldr-too-long-didnt-read">TL;DR <em>(Too long, didn’t read)</em></h2> <p>If it doesn’t matter whether the newest files are not recognized yet:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ mlocate --basename --regex "^my_suites.cfg$" \
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=5" />
<title>Exec A Command For Each Specific File &middot; Hoschi-IT</title>
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml" />
</head>
<body class="theme-base-0d">
<main class="content container">
<article lang="en" class="post h-entry reply" >
<a href="/2021/03/09/exec-a-command-for-each-specific-file/">
<time class="post-date dt-published" datetime="2021-03-09 21:27:30+0100">09 Mar 2021
</time>
</a>
<blockquote class="h-cite cite webmentions u-in-reply-to">
<h4 class="p-name">Bash: Execute a command in each directory with file my_suites.cfg?
</h4>
<section> "I want to create a script which executes a command (similar to make command) in every directory which contains a..."
</section>
<p class="metadata">
<span class="author p-author h-card">Phi-Long Vu
</span>on
<a class="u-url" href="https://unix.stackexchange.com/questions/638389/bash-execute-a-command-in-each-directory-with-file-my-suites-cfg" rel="nofollow" target="_blank">unix.stackexchange.com
</a> at
<time class="dt-published" datetime="2021-03-09 14:38:18+0000">09 Mar 2021
</time>
</p>
</blockquote>
<div class="e-content p-name">
<p>So to summarize the question: You want to run a bash command on each folder that contains a file that has a specific name, one at a time.
</p>
<p>Assuming, that you are willing to use existing tools and not write everything from scratch by yourself, here are some ideas:
</p>
<h2 id="tldr-too-long-didnt-read">TL;DR
<em>(Too long, didn’t read)
</em>
</h2>
<p>If it doesn’t matter whether the newest files are not recognized yet:
</p>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ mlocate --basename --regex "^my_suites.cfg$" \
| xargs dirname \
| xargs -d '\n' &lt;command-to-run-on-the-file&gt;
</code></pre></div></div> <p>Else if efficiency is not so important (assuming, that we are searching recursively in the home directory (<code class="language-plaintext highlighter-rouge">~</code>) only:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ find ~ -name "my_suites.cfg" -type f \
</code>
</pre>
</div>
</div>
<p>Else if efficiency is not so important (assuming, that we are searching recursively in the home directory (
<code class="language-plaintext highlighter-rouge">~
</code>) only:
</p>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ find ~ -name "my_suites.cfg" -type f \
| xargs dirname \
| xargs -d '\n' &lt;command-to-run-on-the-file&gt;
</code></pre></div></div> <hr /> <h2 id="full-version">Full Version</h2> <h3 id="finding-the-files">Finding the files</h3> <p>If the files you are looking for are scattered all over the system, you should care about effectiveness.</p> <h4 id="the-faster-way">The fast(er) way</h4> <p>With some downsides</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ mlocate --basename --regex "^my_suites.cfg$"
</code></pre></div></div> <ul> <li><code class="language-plaintext highlighter-rouge">mlocate</code> looks up file paths in a database that is updated once a day for most distributions. So it may not recognize recently created or recently moved files. But because it looks into the database instead of going through the file system itself, it’s search is very efficient.</li> <li>The <code class="language-plaintext highlighter-rouge">--basename</code> option specifies that we are looking for the direct name of the file, not including the path/directories of it.</li> <li>The <code class="language-plaintext highlighter-rouge">--regex</code> option enables regular expressions being allowed in the search pattern. (The <code class="language-plaintext highlighter-rouge">^</code> expects the string to start there and the <code class="language-plaintext highlighter-rouge">$</code> expects the string to end there.)</li> </ul> <h4 id="the-always-up-to-date-way">The “always up-to-date” way</h4> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ find / -name "my_suites.cfg" -type f
</code></pre></div></div> <ul> <li><code class="language-plaintext highlighter-rouge">find</code> goes through basically every folder it can find and lists every file which is named my_suites.cfg. Because of that many reading-operations that it has to do, the more folders it searches the slower it gets.</li> <li>The <code class="language-plaintext highlighter-rouge">-name</code> option specifies, that my_suites.cfg is the <strong>name</strong> of the file, instead of i.e. a folder that contains the file that we are looking for.</li> <li>The <code class="language-plaintext highlighter-rouge">-type</code> option specifies, that we are looking for a <strong>file</strong>, not for a directory, symlink, socket or something.</li> </ul> <h3 id="running-a-custom-command-on-each-of-the-files">Running a custom command on each of the files</h3> <p>… that’s what <code class="language-plaintext highlighter-rouge">xargs</code> is for</p> <h4 id="a-simple-example">A simple example</h4> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ echo "some simple example" | xargs mkdir
</code>
</pre>
</div>
</div>
<hr />
<h2 id="full-version">Full Version
</h2>
<h3 id="finding-the-files">Finding the files
</h3>
<p>If the files you are looking for are scattered all over the system, you should care about effectiveness.
</p>
<h4 id="the-faster-way">The fast(er) way
</h4>
<p>With some downsides
</p>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ mlocate --basename --regex "^my_suites.cfg$"
</code>
</pre>
</div>
</div>
<ul>
<li>
<code class="language-plaintext highlighter-rouge">mlocate
</code> looks up file paths in a database that is updated once a day for most distributions. So it may not recognize recently created or recently moved files. But because it looks into the database instead of going through the file system itself, it’s search is very efficient.
</li>
<li>The
<code class="language-plaintext highlighter-rouge">--basename
</code> option specifies that we are looking for the direct name of the file, not including the path/directories of it.
</li>
<li>The
<code class="language-plaintext highlighter-rouge">--regex
</code> option enables regular expressions being allowed in the search pattern. (The
<code class="language-plaintext highlighter-rouge">^
</code> expects the string to start there and the
<code class="language-plaintext highlighter-rouge">$
</code> expects the string to end there.)
</li>
</ul>
<h4 id="the-always-up-to-date-way">The “always up-to-date” way
</h4>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ find / -name "my_suites.cfg" -type f
</code>
</pre>
</div>
</div>
<ul>
<li>
<code class="language-plaintext highlighter-rouge">find
</code> goes through basically every folder it can find and lists every file which is named my_suites.cfg. Because of that many reading-operations that it has to do, the more folders it searches the slower it gets.
</li>
<li>The
<code class="language-plaintext highlighter-rouge">-name
</code> option specifies, that my_suites.cfg is the
<strong>name
</strong> of the file, instead of i.e. a folder that contains the file that we are looking for.
</li>
<li>The
<code class="language-plaintext highlighter-rouge">-type
</code> option specifies, that we are looking for a
<strong>file
</strong>, not for a directory, symlink, socket or something.
</li>
</ul>
<h3 id="running-a-custom-command-on-each-of-the-files">Running a custom command on each of the files
</h3>
<p>… that’s what
<code class="language-plaintext highlighter-rouge">xargs
</code> is for
</p>
<h4 id="a-simple-example">A simple example
</h4>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ echo "some simple example" | xargs mkdir
$ # now there are three directories, named by the echoed words
$ ls
example simple some
</code></pre></div></div> <h4 id="something-more-complex">Something more complex:</h4> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ echo "hello world" | xargs -d ' ' -I % echo 'Print a word: %'
</code>
</pre>
</div>
</div>
<h4 id="something-more-complex">Something more complex:
</h4>
<div class="language-plaintext highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>$ echo "hello world" | xargs -d ' ' -I % echo 'Print a word: %'
Print a word: hello
Print a word: world
</code></pre></div></div> <ul> <li><code class="language-plaintext highlighter-rouge">-d</code> option: specifies, which character delimits the arguments from each other (here: a space).</li> <li><code class="language-plaintext highlighter-rouge">-I</code> option: All occurences of the given character (<code class="language-plaintext highlighter-rouge">%</code> in this example) will be replaced by the argument that came from the pipe (before <code class="language-plaintext highlighter-rouge">|</code>)</li> </ul> <p>This is what happens in the above example:</p> <ol> <li><code class="language-plaintext highlighter-rouge">echo</code> prints “hello world” to the standard output (<code class="language-plaintext highlighter-rouge">stdout</code>).</li> <li>The pipe (<code class="language-plaintext highlighter-rouge">|</code>) gives this value (“hello world”) to the following command, which happens to be <code class="language-plaintext highlighter-rouge">xargs</code>.</li> <li><code class="language-plaintext highlighter-rouge">xargs</code> searches for occurences of the delimiter in the argument and splits the argument where it finds the delimiter.</li> <li><code class="language-plaintext highlighter-rouge">xargs</code> loops through the newly created arguments and runs the command with the argument value instead of <code class="language-plaintext highlighter-rouge">%</code></li> </ol> <h3 id="further-readings">Further readings</h3> <ul> <li><a href="https://shapeshed.com/unix-xargs/">Unix xargs</a></li> <li><a href="https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285">Regular Expressions: Tutorial</a></li> <li><a href="https://linux.die.net/man/1/locate">locate man page</a></li> <li>this answer also lives on <a href="https://unix.stackexchange.com/a/638453/459894">unix.stackexchange.com</a></li> </ul> </div> <p><a class="p-category u-tag-of" href="/tags/#stackexchange" > #stackexchange</a> <a class="p-category u-tag-of" href="/tags/#bash" > #bash</a> <a class="p-category u-tag-of" href="/tags/#gnu/linux" > #gnu/linux</a> </p><details> <summary>Meta data</summary><ul class="microformats2"><li> Tags: <ul><li class="p-category"> <a href="https://hoschi-it.de/tags/#stackexchange">stackexchange</a> </li><li class="p-category"> <a href="https://hoschi-it.de/tags/#bash">bash</a> </li><li class="p-category"> <a href="https://hoschi-it.de/tags/#gnu/linux">gnu/linux</a> </li></ul> </li><li> <a class="u-url" href="https://hoschi-it.de/2021/03/09/exec-a-command-for-each-specific-file/"> Permanent post link </a> </li> <li class="p-author h-card" rel="author"> Author <ul> <li>Nickname: <span class="p-name">hoschi-it</span> </li> <li> <a class="u-url p-name" rel="author" href="https://hoschi-it.de/"> Website </a> </li> <li>Profile picture:<img class="u-photo" alt="a kingfischer (bird)" src="/assets/photos/kingfisher.jpeg" width="100" height="100" loading="lazy" /> </li> </ul> </li><li>Also published on <ul><li> <a rel="syndication" class="u-syndication" href="https://unix.stackexchange.com/a/638453/459894">unix.stackexchange.com</a> </li></ul> </li></ul> </details> </article> </main><footer><nav> <ul><li> <a class="" href="/impressum/">Impressum</a> </li><li> <a class="" href="/privacy/">Privacy</a> </li></ul> </nav> <p>&copy; 2021. All rights reserved.</p> </footer> </body> </html>
</code>
</pre>
</div>
</div>
<ul>
<li>
<code class="language-plaintext highlighter-rouge">-d
</code> option: specifies, which character delimits the arguments from each other (here: a space).
</li>
<li>
<code class="language-plaintext highlighter-rouge">-I
</code> option: All occurences of the given character (
<code class="language-plaintext highlighter-rouge">%
</code> in this example) will be replaced by the argument that came from the pipe (before
<code class="language-plaintext highlighter-rouge">|
</code>)
</li>
</ul>
<p>This is what happens in the above example:
</p>
<ol>
<li>
<code class="language-plaintext highlighter-rouge">echo
</code> prints “hello world” to the standard output (
<code class="language-plaintext highlighter-rouge">stdout
</code>).
</li>
<li>The pipe (
<code class="language-plaintext highlighter-rouge">|
</code>) gives this value (“hello world”) to the following command, which happens to be
<code class="language-plaintext highlighter-rouge">xargs
</code>.
</li>
<li>
<code class="language-plaintext highlighter-rouge">xargs
</code> searches for occurences of the delimiter in the argument and splits the argument where it finds the delimiter.
</li>
<li>
<code class="language-plaintext highlighter-rouge">xargs
</code> loops through the newly created arguments and runs the command with the argument value instead of
<code class="language-plaintext highlighter-rouge">%
</code>
</li>
</ol>
<h3 id="further-readings">Further readings
</h3>
<ul>
<li>
<a href="https://shapeshed.com/unix-xargs/">Unix xargs
</a>
</li>
<li>
<a href="https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285">Regular Expressions: Tutorial
</a>
</li>
<li>
<a href="https://linux.die.net/man/1/locate">locate man page
</a>
</li>
<li>this answer also lives on
<a href="https://unix.stackexchange.com/a/638453/459894">unix.stackexchange.com
</a>
</li>
</ul>
</div>
<p>
<a class="p-category u-tag-of" href="/tags/#stackexchange" > #stackexchange
</a>
<a class="p-category u-tag-of" href="/tags/#bash" > #bash
</a>
<a class="p-category u-tag-of" href="/tags/#gnu/linux" > #gnu/linux
</a>
</p>
</article>
</main>
</body>
</html>

11
md/gemfeed/2021-03-17-goals.md

@ -0,0 +1,11 @@
# Goals
Here are some things about the webpage (or my tech stack in general) that I want to accomplish:
* ☐ Fix: Jekyll plugin does not find outgoing webmentions
* ☐ Wikify myself @indiewebcamp.org
* ☑ Relax
* ☐ Implement check lists (for real, not just via some specially formatted note post).
* ☐ put it on the IPFS, just for fun :D
* ☐ make publishing from mobile possible (via micropub)
* ☐ generate seperate h-feed and link to it

1
md/gemfeed/index.md

@ -3,6 +3,7 @@
## Live like you are loved.
[2022-03-13 (0102 words) - Why does this website look so old?](./2022-03-13-why-does-this-website-look-so-old.md)
[2021-03-17 (0082 words) - Goals](./2021-03-17-goals.md)
[2020-12-29 (0204 words) - A staging area for my website](./2020-12-29-staging-subdomain.md)
[2020-12-28 (0076 words) - Thanks @aaronpk](./2020-12-28-sending-your-first-webmention.md)
[2020-12-27 (0343 words) - 2021 and the IndieWeb](./2020-12-27-indieweb.md)

34
md/history.md

@ -0,0 +1,34 @@
# History
[/projects/ducks-landing-page/index.html](/projects/ducks-landing-page/index.html)
[/404.html](/404.html)
[/privacy/index.html](/privacy/index.html)
[/2021/01/02/danke/index.html](/2021/01/02/danke/index.html)
[/2021/01/05/cli-anwendungen/index.html](/2021/01/05/cli-anwendungen/index.html)
[/2021/01/05/covid19-musical-vaccine/index.html](/2021/01/05/covid19-musical-vaccine/index.html)
[/2021/01/06/kein-parser-im-hirn/index.html](/2021/01/06/kein-parser-im-hirn/index.html)
[/2021/03/17/goals/index.html](/2021/03/17/goals/index.html)
[/2021/03/17/reply-1/index.html](/2021/03/17/reply-1/index.html)
[/2021/03/07/bookmark-12-factor-app/index.html](/2021/03/07/bookmark-12-factor-app/index.html)
[/2021/03/07/indieweb-internetarchive-channel/index.html](/2021/03/07/indieweb-internetarchive-channel/index.html)
[/2021/03/07/bookmark-resilient-web-design/index.html](/2021/03/07/bookmark-resilient-web-design/index.html)
[/2021/03/10/rsvp-hwc-europe/index.html](/2021/03/10/rsvp-hwc-europe/index.html)
[/2021/03/10/bookmark-markdown-syntax-documentation/index.html](/2021/03/10/bookmark-markdown-syntax-documentation/index.html)
[/2021/03/15/completed-tutorials/index.html](/2021/03/15/completed-tutorials/index.html)
[/2021/03/09/exec-a-command-for-each-specific-file/index.html](/2021/03/09/exec-a-command-for-each-specific-file/index.html)
[/2021/03/14/note-test/index.html](/2021/03/14/note-test/index.html)
[/2021/03/14/plain-note-post-type/index.html](/2021/03/14/plain-note-post-type/index.html)
[/2021/03/16/like-one-year-in-the-indieweb/index.html](/2021/03/16/like-one-year-in-the-indieweb/index.html)
[/2021/03/16/bookmark-man-gnu-coreutils/index.html](/2021/03/16/bookmark-man-gnu-coreutils/index.html)
[/2021/03/12/bookmark-indiewebxyz/index.html](/2021/03/12/bookmark-indiewebxyz/index.html)
[/2021/03/12/like-non-technical-indieweb/index.html](/2021/03/12/like-non-technical-indieweb/index.html)
[/2021/03/11/repost-messenger-ausweispflicht/index.html](/2021/03/11/repost-messenger-ausweispflicht/index.html)
[/2021/03/11/like-what-matters/index.html](/2021/03/11/like-what-matters/index.html)
[/2021/03/20/note-ipfs-publish/index.html](/2021/03/20/note-ipfs-publish/index.html)
[/2021/03/13/bookmark-fedbridgy/index.html](/2021/03/13/bookmark-fedbridgy/index.html)
[/a/deleted/post.html](/a/deleted/post.html)
[/about/index.html](/about/index.html)
[/tags/index.html](/tags/index.html)
[/410.html](/410.html)
[/replies/2020/2020-12-28-sending-your-first-webmention/index.html](/replies/2020/2020-12-28-sending-your-first-webmention/index.html)
[/s/1/index.html](/s/1/index.html)
[/2020/01/01/lets-start/index.html](/2020/01/01/lets-start/index.html)

2
md/index.md

@ -11,10 +11,12 @@ I have been switching back and forth between multiple content management systems
[Contact information](./contact-information.md)
[Resources that made an impact on me](./resources.md)
[Posts to be migrated](./history.md)
[Atom feed for my posts](./gemfeed/atom.xml)
## Posts
[2022-03-13 - Why does this website look so old?](./gemfeed/2022-03-13-why-does-this-website-look-so-old.md)
[2021-03-17 - Goals](./gemfeed/2021-03-17-goals.md)
[2020-12-29 - A staging area for my website](./gemfeed/2020-12-29-staging-subdomain.md)
[2020-12-28 - Thanks @aaronpk](./gemfeed/2020-12-28-sending-your-first-webmention.md)
[2020-12-27 - 2021 and the IndieWeb](./gemfeed/2020-12-27-indieweb.md)

5
meta/gemfeed/2021-03-17-goals.meta

@ -0,0 +1,5 @@
local meta_date="2021-03-17T18:39:11+01:00"
local meta_author="hoschi-it"
local meta_email="me@hoschi-it.de"
local meta_title="Goals"
local meta_summary=". .....to read on please visit my site."

3
redirect.csv

@ -0,0 +1,3 @@
Source;Target
/2021/03/17/goals/index.html;/gemfeed/2021-03-17-goals.html
/2020/01/01/lets-start/index.html;/gemfeed/2020-01-01-lets-start.html
Loading…
Cancel
Save