Skip to content

Commit

Permalink
Try to make Jekyll less awful about curly brackets in article
Browse files Browse the repository at this point in the history
  • Loading branch information
themkat committed Feb 24, 2024
1 parent 5b79337 commit 779e7a3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions org/_posts/2024-02-24-command_line_tricks_globbing.org
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#+BEGIN_EXPORT html
---
layout: blogpost
title: Command line tricks: Globbing basics
title: "Command line tricks: Globbing basics"
tags: cli linux macosx automation
---
#+END_EXPORT
Expand Down Expand Up @@ -334,12 +334,13 @@ We could also easily have done a positive match:
#+END_SRC


** Multiple possible match types with ={}=
** Multiple possible match types with {% raw %} ={}= {% endraw %}
Sometimes we have multiple possible patterns we want to match. bash has us covered here, and we can cover our options with curly brackets delimited by commas. This is probably best explained with some examples.

*** Matching files ending with either html, sh or el
We want to match anything ending with either html, sh or el. Using the anything matcher in combination with the multiple matcher then looks like the following:

{% raw %}
#+BEGIN_SRC bash
$ ls -1 *.{html,el,sh}
404.html
Expand All @@ -350,6 +351,7 @@ We want to match anything ending with either html, sh or el. Using the anything
org_publish.el
privacypolicy.html
#+END_SRC
{% endraw %}


We notice that two of our patterns end with l. As the inside of the multiple matcher is simply patterns, we can use that to our advantage with an inner pattern:
Expand Down

0 comments on commit 779e7a3

Please sign in to comment.