<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>UsingDataFiles &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:UsingDataFiles</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 16:27:05 +0000</pubDate>
    <item>
      <title>Bash scripting 18 – Using data files 4</title>
      <link>https://personaljournal.ca/paulsutton/bash-scripting-18-using-data-files-4</link>
      <description>&lt;![CDATA[Bash scripting 18 – Using data files 4&#xA;&#xA;So, carrying on from the previous article(s).  &#xA;&#xA;Using the guide at [2].  We can set a few labels up so the graph looks nicer.&#xA;&#xA;Once in gnu plot you can issue commands, then run replot to redraw the graph. &#xA;&#xA;gnuplot  plot &#39;log.csv&#39;&#xA;gnuplot  plot &#39;log.csv&#39; with lines&#xA;gnuplot  set title &#39;Example Plot&#39;&#xA;gnuplot  set xlabel &#39;x axis&#39;&#xA;gnuplot  set ylabel &#39;y axis&#39; &#xA;gnuplot  replot&#xA;gnuplot  set key top right&#xA;gnuplot  replot&#xA;&#xA;By running replot we can see the results are what we want before carrying on. &#xA;&#xA;All this is just a small sample of what can be done,  I will explore more on this once I have some useful, rather than randomly generated data to plot or do things with.&#xA;&#xA;References&#xA;&#xA;1 gnuplot&#xA;2 gnuplot examples&#xA;&#xA;Chat&#xA;&#xA;I am on the Devon and Cornwall Linux user group mailing list and also their matrix channel as zleap, it is better to ask there, that way others can answer too.&#xA;&#xA;Tags&#xA;&#xA;#Bash,#Bashscripting,#BashScripting,#Files,#UsingDataFiles,#Data,#gnuplot,#graphs&#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 18 – Using data files 4</p>

<p>So, carrying on from the previous article(s).</p>

<p>Using the guide at [2].  We can set a few labels up so the graph looks nicer.</p>

<p>Once in gnu plot you can issue commands, then run replot to redraw the graph.</p>

<pre><code>gnuplot&gt; plot &#39;log.csv&#39;
gnuplot&gt; plot &#39;log.csv&#39; with lines
gnuplot&gt; set title &#39;Example Plot&#39;
gnuplot&gt; set xlabel &#39;x axis&#39;
gnuplot&gt; set ylabel &#39;y axis&#39; 
gnuplot&gt; replot
gnuplot&gt; set key top right
gnuplot&gt; replot

</code></pre>

<p>By running <em>replot</em> we can see the results are what we want before carrying on.</p>

<p>All this is just a small sample of what can be done,  I will explore more on this once I have some useful, rather than randomly generated data to plot or do things with.</p>

<p><strong>References</strong></p>

<p>1 <a href="https://www.gnuplot.info" rel="nofollow">gnuplot</a>
2 <a href="https://alvinalexander.com/technology/gnuplot-charts-graphs-examples/#4" rel="nofollow">gnuplot examples</a></p>

<p><strong>Chat</strong></p>

<p>I am on the <a href="https://www.dcglug.org.uk/" rel="nofollow">Devon and Cornwall Linux user group</a> mailing list and also their <a href="https://matrix.to/#/%23dcglug:matrix.org" rel="nofollow">matrix channel</a> as zleap, it is better to ask there, that way others can answer too.</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:BashScripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">BashScripting</span></a>,<a href="/paulsutton/tag:Files" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Files</span></a>,<a href="/paulsutton/tag:UsingDataFiles" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">UsingDataFiles</span></a>,<a href="/paulsutton/tag:Data" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Data</span></a>,<a href="/paulsutton/tag:gnuplot" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">gnuplot</span></a>,<a href="/paulsutton/tag:graphs" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">graphs</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-18-using-data-files-4</guid>
      <pubDate>Sun, 20 Apr 2025 06:00:00 +0000</pubDate>
    </item>
    <item>
      <title>Bash scripting 17 – Using data files 3</title>
      <link>https://personaljournal.ca/paulsutton/bash-scripting-17-using-data-files-3</link>
      <description>&lt;![CDATA[Bash scripting 17 – Using data files 3&#xA;&#xA;So, carrying on from the previous article(s).  I am going to be using gnuplot to display the data.   I found a useful site, that has examples of how to use the software,  from basic to more advanced examples. &#xA;&#xA;Notes: As with bash gnu plot has command history, so you can use arrow keys to move up / down between previously entered commands.&#xA;&#xA;Based on the information at [2] we can produce a very basic plot of what is in log.csv&#xA;&#xA;Load GNUPlot&#xA;&#xA;gnuplot&#xA;and enter&#xA;&#xA;plot &#39;log.csv&#39;&#xA;This example isn&#39;t all that good really, but it at least produces some output.  I have modified one of the examples further down that page&#xA;&#xA;plot &#39;log.csv&#39; using 1:2 with lines, &#39;log.csv&#39; using 1:2 with lines&#xA; So the following data set&#xA;&#xA;0, 1&#xA;1, 10&#xA;2, 10&#xA;3, 7&#xA;4, 2&#xA;5, 1&#xA;6, 15&#xA;7, 0&#xA;8, 19&#xA;9, 3&#xA;&#xA;Should produce something like&#xA;&#xA;gnuplot 1&#xA;&#xA;Adding extra columns&#xA;&#xA;We probably need more than two columns.  This is easily done by modifying the loop in the script gendata1.csv.   It is a good idea to copy this to a new script so it keeps the original as is&#xA;&#xA;cp gendata1.sh gendata2.sh&#xA;As gendata1.sh has write permissions, these will be preserved in the new copy of the file.   We can now edit  gendata2.sh&#xA;&#xA;echo &#34;number&#34; &#34;data&#34; # for reference, not written to file &#xA;for ((i = 0 ; i &lt; 10 ; i++)); do&#xA;    echo $i, $((RANDOM % 20)), $((RANDOM % 20)) # echo to screen (stdout)&#xA;&#x9;echo $i, $((RANDOM % 20)), $((RANDOM % 20))     log.csv # write to file&#xA;    #write_csv $(($i, $RANDOM % 10))&#xA;done&#xA;So all we are doing here is adding in, note the comma&#xA;&#xA;, $((RANDOM % 20))&#xA;&#xA;As the only difference between the lines&#xA;&#xA;echo $i, $((RANDOM % 20)), $((RANDOM % 20)) # echo to screen (stdout)&#xA;echo $i, $((RANDOM % 20)), $((RANDOM % 20))     log.csv # write to file&#xA;Is that the first line, writes to the screen, it may be better to test the script out, check it does what you want, then modify the line that writes to a file once you are happy.&#xA;&#xA;References&#xA;&#xA;1 gnuplot&#xA;2 gnuplot examples&#xA;GNU Plot and LaTeX, included for reference&#xA;&#xA;Chat&#xA;&#xA;I am on the Devon and Cornwall Linux user group mailing list and also their matrix channel as zleap, it is better to ask there, that way others can answer too.&#xA;&#xA;Tags&#xA;&#xA;#Bash,#Bashscripting,#Files,#UsingDataFiles,#Data,#gnuplot,#graphs,#BashScripting&#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 17 – Using data files 3</p>

<p>So, carrying on from the previous article(s).  I am going to be using gnuplot to display the data.   I found a useful site, that has examples of how to use the software,  from basic to more advanced examples.</p>

<p>Notes: As with bash gnu plot has command history, so you can use arrow keys to move up / down between previously entered commands.</p>

<p>Based on the information at [2] we can produce a very basic plot of what is in log.csv</p>

<p>Load GNUPlot</p>

<pre><code class="language-bash">gnuplot
</code></pre>

<p>and enter</p>

<pre><code class="language-gnuplot">plot &#39;log.csv&#39;
</code></pre>

<p>This example isn&#39;t all that good really, but it at least produces some output.  I have modified one of the examples further down that page</p>

<pre><code class="language-gnuplot">plot &#39;log.csv&#39; using 1:2 with lines, &#39;log.csv&#39; using 1:2 with lines
</code></pre>

<p> So the following data set</p>

<pre><code class="language-text">0, 1
1, 10
2, 10
3, 7
4, 2
5, 1
6, 15
7, 0
8, 19
9, 3

</code></pre>

<p>Should produce something like</p>

<p><img src="https://salsa.debian.org/zleap-guest/blog-media/-/raw/master/gnuplot1.png" alt="gnuplot 1"></p>

<p>Adding extra columns</p>

<p>We probably need more than two columns.  This is easily done by modifying the loop in the script gendata1.csv.   It is a good idea to copy this to a new script so it keeps the original as is</p>

<pre><code class="language-bash">cp gendata1.sh gendata2.sh
</code></pre>

<p>As gendata1.sh has write permissions, these will be preserved in the new copy of the file.   We can now edit  gendata2.sh</p>

<pre><code class="language-bash">echo &#34;number&#34; &#34;data&#34; # for reference, not written to file 
for ((i = 0 ; i &lt; 10 ; i++)); do
    echo $i, $((RANDOM % 20)), $((RANDOM % 20)) # echo to screen (stdout)
	echo $i, $((RANDOM % 20)), $((RANDOM % 20)) &gt;&gt; log.csv # write to file
    #write_csv $(($i, $RANDOM % 10))
done
</code></pre>

<p>So all we are doing here is adding in, <strong>note the comma</strong></p>

<pre><code class="language-bash">, $((RANDOM % 20))
</code></pre>

<p>As the only difference between the lines</p>

<pre><code class="language-bash">echo $i, $((RANDOM % 20)), $((RANDOM % 20)) # echo to screen (stdout)
echo $i, $((RANDOM % 20)), $((RANDOM % 20)) &gt;&gt; log.csv # write to file
</code></pre>

<p>Is that the first line, writes to the screen, it may be better to test the script out, check it does what you want, then modify the line that writes to a file once you are happy.</p>

<p><strong>References</strong></p>

<p>1 <a href="https://www.gnuplot.info" rel="nofollow">gnuplot</a>
2 <a href="https://alvinalexander.com/technology/gnuplot-charts-graphs-examples/#4" rel="nofollow">gnuplot examples</a>
3. <a href="https://ctan.org/pkg/gnuplottex" rel="nofollow">GNU Plot and LaTeX</a>, included for reference</p>

<p><strong>Chat</strong></p>

<p>I am on the <a href="https://www.dcglug.org.uk/" rel="nofollow">Devon and Cornwall Linux user group</a> mailing list and also their <a href="https://matrix.to/#/%23dcglug:matrix.org" rel="nofollow">matrix channel</a> as zleap, it is better to ask there, that way others can answer too.</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:Files" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Files</span></a>,<a href="/paulsutton/tag:UsingDataFiles" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">UsingDataFiles</span></a>,<a href="/paulsutton/tag:Data" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Data</span></a>,<a href="/paulsutton/tag:gnuplot" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">gnuplot</span></a>,<a href="/paulsutton/tag:graphs" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">graphs</span></a>,<a href="/paulsutton/tag:BashScripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">BashScripting</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-17-using-data-files-3</guid>
      <pubDate>Sat, 19 Apr 2025 06:10:00 +0000</pubDate>
    </item>
    <item>
      <title>Bash scripting 16 – Using data files 2</title>
      <link>https://personaljournal.ca/paulsutton/bash-scripting-16-using-data-files-2</link>
      <description>&lt;![CDATA[Bash scripting 16 – Using data files 2&#xA;&#xA;So, carrying on from the previous article(s).  I am going to be using gnuplot and awk, and see what I can do with the data generated by my script.&#xA;&#xA;It would be useful to be able to remove content in the file we are using with awk, so new data is not added to existing data.&#xA;&#xA;We can do this by running:-&#xA;&#xA;echo &#34; &#34;   log.csv&#xA;This should ensure the file is empty&#xA;&#xA;we can then rerun&#xA;./gencsv1.sh &#xA;And check contents with&#xA;echo csv.log&#xA;&#xA;So according to the article,  we can list the data in the 2nd column&#xA;&#xA;awk -F, &#39;{ print $2}&#39; log.csv&#xA;&#xA; 2&#xA; 7&#xA; 14&#xA; 4&#xA; 5&#xA; 7&#xA; 17&#xA; 19&#xA; 0&#xA; 19&#xA;&#xA;and on a similar note, to list what is in the first column&#xA;awk -F, &#39;{ print $1}&#39; log.csv&#xA;and we can calculate the sum using&#xA;&#xA;awk -F, &#39;{ sum +=$2} END { print sum }&#39; log.csv&#xA;94&#xA;and the average&#xA;&#xA;awk -F, &#39;{ sum +=$2} END { print sum/NR }&#39; log.csv&#xA;8.54545&#xA;&#xA;Chat&#xA;&#xA;I am on the Devon and Cornwall Linux user group mailing list and also their matrix channel as zleap, it is better to ask there, that way others can answer too.&#xA;&#xA;Tags&#xA;&#xA;#Bash,#Bashscripting,#Files,#UsingDataFiles,#Data,#BashScripting&#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 16 – Using data files 2</p>

<p>So, carrying on from the previous article(s).  I am going to be using gnuplot and awk, and see what I can do with the data generated by my script.</p>

<p>It would be useful to be able to remove content in the file we are using with awk, so new data is not added to existing data.</p>

<p>We can do this by running:-</p>

<pre><code>echo &#34; &#34; &gt; log.csv
</code></pre>

<p>This should ensure the file is empty</p>

<p>we can then rerun</p>

<pre><code>./gencsv1.sh 
</code></pre>

<p>And check contents with</p>

<pre><code>echo csv.log
</code></pre>

<p>So according to the article,  we can list the data in the 2nd column</p>

<pre><code>awk -F, &#39;{ print $2}&#39; log.csv

 2
 7
 14
 4
 5
 7
 17
 19
 0
 19

</code></pre>

<p>and on a similar note, to list what is in the first column</p>

<pre><code>awk -F, &#39;{ print $1}&#39; log.csv
</code></pre>

<p>and we can calculate the sum using</p>

<pre><code>awk -F, &#39;{ sum +=$2} END { print sum }&#39; log.csv
94
</code></pre>

<p>and the average</p>

<pre><code>awk -F, &#39;{ sum +=$2} END { print sum/NR }&#39; log.csv
8.54545
</code></pre>

<p><strong>Chat</strong></p>

<p>I am on the <a href="https://www.dcglug.org.uk/" rel="nofollow">Devon and Cornwall Linux user group</a> mailing list and also their <a href="https://matrix.to/#/%23dcglug:matrix.org" rel="nofollow">matrix channel</a> as zleap, it is better to ask there, that way others can answer too.</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:Files" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Files</span></a>,<a href="/paulsutton/tag:UsingDataFiles" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">UsingDataFiles</span></a>,<a href="/paulsutton/tag:Data" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Data</span></a>,<a href="/paulsutton/tag:BashScripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">BashScripting</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-16-using-data-files-2</guid>
      <pubDate>Fri, 18 Apr 2025 06:00:00 +0000</pubDate>
    </item>
    <item>
      <title>Bash scripting 15 – Using data files 1</title>
      <link>https://personaljournal.ca/paulsutton/bash-scripting-15-using-data-files-1</link>
      <description>&lt;![CDATA[Bash scripting 15 – Using data files 1&#xA;&#xA;So, carrying on from the previous article.  I am going to be using gnuplot and awk, and see what I can do with the data generated by my script.&#xA;&#xA;So the first task, if of course to install gnu plot&#xA;&#xA;sudo apt install gnuplot&#xA;&#xA;It is also a good idea at this stage to determine version numbers of the tools we are using&#xA;&#xA;gnuplot -V&#xA;gnuplot 6.0 patchlevel 0&#xA;and &#xA;awk -V&#xA;GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)&#xA;Copyright (C) 1989, 1991-2022 Free Software Foundation.&#xA;&#xA;This program is free software; you can redistribute it and/or modify&#xA;it under the terms of the GNU General Public License as published by&#xA;the Free Software Foundation; either version 3 of the License, or&#xA;(at your option) any later version.&#xA;&#xA;This program is distributed in the hope that it will be useful,&#xA;but WITHOUT ANY WARRANTY; without even the implied warranty of&#xA;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&#xA;GNU General Public License for more details.&#xA;&#xA;You should have received a copy of the GNU General Public License&#xA;along with this program. If not, see http://www.gnu.org/licenses/.&#xA;&#xA;Tags&#xA;&#xA;#Bash,#Bashscripting,#Files,#UsingDataFiles,#Data&#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 15 – Using data files 1</p>

<p>So, carrying on from the previous article.  I am going to be using gnuplot and awk, and see what I can do with the data generated by my script.</p>

<p>So the first task, if of course to install gnu plot</p>

<pre><code class="language-bash">sudo apt install gnuplot
</code></pre>

<p>It is also a good idea at this stage to determine version numbers of the tools we are using</p>

<pre><code>gnuplot -V
gnuplot 6.0 patchlevel 0
</code></pre>

<p>and</p>

<pre><code>awk -V
GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)
Copyright (C) 1989, 1991-2022 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
</code></pre>

<p>Tags</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:Files" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Files</span></a>,<a href="/paulsutton/tag:UsingDataFiles" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">UsingDataFiles</span></a>,<a href="/paulsutton/tag:Data" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Data</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-15-using-data-files-1</guid>
      <pubDate>Thu, 17 Apr 2025 06:00:00 +0000</pubDate>
    </item>
  </channel>
</rss>