<div dir="ltr">My unsolicited opinion, based off using Ruby, is that if the cost of a fork is critical use C or Go. Otherwise, "a difference that makes no difference is no difference". </div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 24, 2016 at 12:00 PM, Chris Fowler <span dir="ltr"><<a href="mailto:cfowler@outpostsentinel.com" target="_blank">cfowler@outpostsentinel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:12pt"><div><br></div><div><br></div><hr id="m_-4481118898820999279zwchr"><div><blockquote style="color:rgb(0,0,0);padding-left:5px;font-family:Helvetica,Arial,sans-serif;font-size:12pt;font-style:normal;font-weight:normal;text-decoration:none;margin-left:5px;border-left-color:rgb(16,16,255);border-left-width:2px;border-left-style:solid"><b>From: </b>"Jim Kinney" <<a href="mailto:jim.kinney@gmail.com" target="_blank">jim.kinney@gmail.com</a>><br><b>To: </b>"Atlanta Linux Enthusiasts - Yes! We run Linux!" <<a href="mailto:ale@ale.org" target="_blank">ale@ale.org</a>><br><b>Sent: </b>Friday, October 21, 2016 8:00:46 PM<br><b>Subject: </b>Re: [ale] Bash vs Perl<br></blockquote></div><div><blockquote style="color:rgb(0,0,0);padding-left:5px;font-family:Helvetica,Arial,sans-serif;font-size:12pt;font-style:normal;font-weight:normal;text-decoration:none;margin-left:5px;border-left-color:rgb(16,16,255);border-left-width:2px;border-left-style:solid"><p dir="ltr">Parsing text in bash is much harder than in Perl. Associative arrays in bash really help.</p></blockquote><div><br></div><div>Yes. I do know you can do regex, but those features come at the cost of portability.</div><div><br></div><div>The biggest ding in bash over perl could be the expense of fork(). Using bash features that are not portable could recoup those.</div><div><br></div><div>For those not following, text processing in shell is accomplished using a pipeline into other programs that my pipe into other programs. For small jobs this expense in minimal. Large jobs may not have the budget...</div><div><br></div><div>When I use shell to do X and that X includes a database insert it is many times faster for me to just have bash create a SQL file and then I import that. The alternative is 1000s of fork then exec sqlite3 or mysql for each row. Just the nature of the shells. We have languages that can grab and maintain a database handle.</div><div><br></div><div><br></div><div><br></div><div><br></div><blockquote style="color:rgb(0,0,0);padding-left:5px;font-family:Helvetica,Arial,sans-serif;font-size:12pt;font-style:normal;font-weight:normal;text-decoration:none;margin-left:5px;border-left-color:rgb(16,16,255);border-left-width:2px;border-left-style:solid"><div class="gmail_extra"><div class="gmail_quote">On Oct 21, 2016 6:33 PM, "Chris Fowler" <<a href="mailto:cfowler@outpostsentinel.com" target="_blank">cfowler@outpostsentinel.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><div style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:12pt"><div>Not a rant or question, just a thought.</div><br><div>I've been working on "Jenga Linux" and since I do not have many perl modules until later in the build of LFS 7.10 I'm sticking to bash as much as possible. GNU STOW is an exception, but it uses perl in /tools from chapter 5 until it can be installed in chapter 6. Beyond that , the only perl module in chapter 5 is XML::Parser. I could install all modules needed in /tools and use them in chapter 6, but I'm forcing myself to expand my bash experience by using what most other disti creators use. </div><br><div>It would nice to find a book titled: "Bash for Perl Programmers". Very simple tasks I do in Perl are a struggle in bash. Stack Exchange is not short on answers. </div><br><div>Chris</div></div></div><br>______________________________<wbr>_________________<br> Ale mailing list<br><a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br><a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank" rel="noreferrer">http://mail.ale.org/mailman/<wbr>listinfo/ale</a><br> See JOBS, ANNOUNCE and SCHOOLS lists at<br><a href="http://mail.ale.org/mailman/listinfo" target="_blank" rel="noreferrer">http://mail.ale.org/mailman/<wbr>listinfo</a><br><br></blockquote></div></div><br>______________________________<wbr>_________________<br>Ale mailing list<br><a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br><a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/<wbr>listinfo/ale</a><br>See JOBS, ANNOUNCE and SCHOOLS lists at<br><a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/<wbr>listinfo</a><br></blockquote></div></div></div><br>______________________________<wbr>_________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank" rel="noreferrer">http://mail.ale.org/mailman/<wbr>listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank" rel="noreferrer">http://mail.ale.org/mailman/<wbr>listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div><a href="http://leamhall.blogspot.com/" target="_blank">Mind on a Mission</a></div></div>
</div>