<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Brian Bills</title>
    <description>The latest articles on DEV Community by Brian Bills (@brianbills21).</description>
    <link>https://dev.to/brianbills21</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F915170%2F2a4ec9ff-ed18-438c-9899-7f05b6cea2b4.jpeg</url>
      <title>DEV Community: Brian Bills</title>
      <link>https://dev.to/brianbills21</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brianbills21"/>
    <language>en</language>
    <item>
      <title>awk total records processed</title>
      <dc:creator>Brian Bills</dc:creator>
      <pubDate>Thu, 25 Aug 2022 08:41:00 +0000</pubDate>
      <link>https://dev.to/brianbills21/awk-total-records-processed-7ml</link>
      <guid>https://dev.to/brianbills21/awk-total-records-processed-7ml</guid>
      <description>&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;I would like to add several lines to the output of my script. Currently, the script behaves as outlined in the README.md file &lt;a href="https://github.com/brianbills21/parse-samples"&gt;here&lt;/a&gt;. But the behavior I want to change it to is below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./sample.sh -s 0-9 -c 0-3 -t samples.bin
                Ch0     Ch1     Ch2     Ch3
Sample 0:       0x1a03  0x1a03  0x4a03  0x5703
Sample 1:       0x4b03  0x4403  0x1e03  0x0904
Sample 2:       0x1003  0x1903  0x4003  0xae03
Sample 3:       0x1e03  0x2603  0x3303  0xad03
Sample 4:       0x1003  0x8403  0x4303  0x6203
Sample 5:       0xe003  0x1603  0x3403  0xc403
Sample 6:       0xf802  0x3b03  0x5303  0x6103
Sample 7:       0x1003  0x1503  0x4203  0x5803
Sample 8:       0x2303  0x1f03  0x5703  0x6203
Sample 9:       0x1703  0x7303  0x3103  0x3303
Total Samples in Record:        374371
Total Samples Processed:        10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./sample.sh -r samples.bin
Total Samples in Record:        374371
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./sample.sh -t samples.bin
Total Samples in Record:        374371
Total Samples Processed:        374371
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script works as expected, I just want the argument -r to replace -t and passing -t after -s and -c, should produce the total number of samples processed along with the total number of samples in the input file. I should still be able to pass -t to sample.sh, but in this case, it will count the number of samples in the file and tell us the total number of samples processed. The script is &lt;a href="https://github.com/brianbills21/parse-samples/blob/main/sample.sh"&gt;here&lt;/a&gt;. If you want you can clone the project and then do a pull request, and if the solution works, I'll approve it.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br&gt;
Brian&lt;/p&gt;

</description>
      <category>bash</category>
      <category>awk</category>
      <category>programming</category>
      <category>python</category>
    </item>
  </channel>
</rss>
