Hi All,
I would like to add several lines to the output of my script. Currently, the script behaves as outlined in the README.md file here. But the behavior I want to change it to is below:
./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
and here:
./sample.sh -r samples.bin Total Samples in Record: 374371
./sample.sh -t samples.bin Total Samples in Record: 374371 Total Samples Processed: 374371
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 here. If you want you can clone the project and then do a pull request, and if the solution works, I'll approve it.
Thanks,Brian
Hi Brian,
what Bentley Systems product do you use?
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,
I wasn't aware of the fact that I had to use Bentley products to use this forum. Do I have to purchase products to use this forum? I thought it was a public dev community forum.
Brian
Brian B said:I wasn't aware of the fact that I had to use Bentley products to use this forum.
It is not mandatory, but the whole web is dedicated to Bentley Systems products and the user community (and it is the reason why it is named "Bentley Communities", hosted in Bentley Systems domain). So a question about anything else can be confusing.
Brian B said:I thought it was a public dev community forum.
I recommend to use general forums, like some on Stack Overflow, or - because your question looks like related to Unix shell - to find forum specialized to Unix / Linux / bash topics.
Okay Jan, no worries. By the way, I like the way when I paste my post into your interface, it picks up the code blocks, links, formatting, everything. Very nicely done site. Oh and you might want to let this site Top 35 Coding Forums, Discussion and Message Boards in 2022 (feedspot.com) know that your site is not a general public dev community forum, its where I got the link from.