<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>exiftoolmenu &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:exiftoolmenu</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 16:34:31 +0000</pubDate>
    <item>
      <title>Bash scripting 11 - ExifTool menu</title>
      <link>https://personaljournal.ca/paulsutton/bash-scripting-11-exiftool-menu</link>
      <description>&lt;![CDATA[Bash scripting 11 - ExifTool menu&#xA;&#xA;I have created a very rough and basic script to :-&#xA;&#xA;Display a directory listing (currently this will display only .png and .JPG files.&#xA;As for a filename&#xA;Display a menu, so that users can choose which Meta data information to display.&#xA;&#xA;https://www.baeldung.com/linux/shell-script-simple-select-menu&#xA;!/bin/bash&#xA;clear # clear display - lets keep things tidy&#xA;ls .png .JPG #display directory listing png files&#xA;echo&#xA;echo &#34;Please enter a filename&#34;&#xA;echo&#xA;read filename&#xA;echo &#34;File: &#34; $filename&#xA;echo&#xA;echo &#34;Menu&#34;&#xA;echo&#xA;PS3=&#34;Select your Option: &#34;&#xA;&#xA;while true; do&#xA;    select lng in All ImageSize FileSize PixelSize ClearScreen Quit&#xA;    do&#xA;        case $lng in&#xA;            &#xA;            &#34;All&#34;)&#xA;                exiftool $filename; break;;&#xA;            &#34;ImageSize&#34;)&#xA;               exiftool -s -ImageSize $filename; break;;&#xA;            &#34;FileSize&#34;)&#xA;              exiftool -s -FileSize $filename;break;;&#xA;            &#34;PixelSize&#34;)&#xA;                exiftool -s -Megapixels $filename;break;;&#xA;            &#34;ClearScreen&#34;)&#xA;                clear;break;;&#xA;            &#34;Quit&#34;)&#xA;               echo &#34;We&#39;re done&#34;; break 2;;&#xA;            *)&#xA;               echo &#34;Ooops&#34;; break ;;&#xA;        esac&#xA;    done&#xA;done&#xA;&#xA;It is a little rough around the edges, but it works, and there is, of course, room for improvement.&#xA;&#xA;Tags&#xA;&#xA;#Bash,#Bashscripting,#ExifToolMenu,#MetaData&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Bash scripting 11 – ExifTool menu</p>

<p>I have created a very rough and basic script to :-</p>
<ul><li>Display a directory listing (currently this will display only .png and .JPG files.</li>
<li>As for a filename</li>
<li>Display a menu, so that users can choose which Meta data information to display.</li></ul>

<pre><code class="language-bash"># https://www.baeldung.com/linux/shell-script-simple-select-menu
#!/bin/bash
clear # clear display - lets keep things tidy
ls *.png *.JPG #display directory listing png files
echo
echo &#34;Please enter a filename&#34;
echo
read filename
echo &#34;File: &#34; $filename
echo
echo &#34;Menu&#34;
echo
PS3=&#34;Select your Option: &#34;

while true; do
    select lng in All ImageSize FileSize PixelSize ClearScreen Quit
    do
        case $lng in
            
            &#34;All&#34;)
                exiftool $filename; break;;
            &#34;ImageSize&#34;)
               exiftool -s -ImageSize $filename; break;;
            &#34;FileSize&#34;)
              exiftool -s -FileSize $filename;break;;
            &#34;PixelSize&#34;)
                exiftool -s -Megapixels $filename;break;;
            &#34;ClearScreen&#34;)
                clear;break;;
            &#34;Quit&#34;)
               echo &#34;We&#39;re done&#34;; break 2;;
            *)
               echo &#34;Ooops&#34;; break ;;
        esac
    done
done
</code></pre>

<p>It is a little rough around the edges, but it works, and there is, of course, room for improvement.</p>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:Bash" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Bash</span></a>,<a href="/paulsutton/tag:Bashscripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Bashscripting</span></a>,<a href="/paulsutton/tag:ExifToolMenu" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">ExifToolMenu</span></a>,<a href="/paulsutton/tag:MetaData" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">MetaData</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/bash-scripting-11-exiftool-menu</guid>
      <pubDate>Sat, 08 Feb 2025 22:46:35 +0000</pubDate>
    </item>
  </channel>
</rss>