[CR] Luke Smith's 'emailwiz.sh' Shell Script for Debian

My GitHub:

Thanks for watching! Don’t forget the whole subscribing and liking thing, if you care for it.

Luke Smith’s ’emailwiz’ Project:

My BASH and Bourne Shell projects:

My PERL projects:

My BASH configuration:

My i3-wm/i3-gaps configuration:

My Vim configuration:

#Linux #LukeSmith #emailwiz.sh #Review

11 thoughts on “[CR] Luke Smith's 'emailwiz.sh' Shell Script for Debian

  1. At 14:52, is the grouping really necessary ? As far as I understand it doesn't help in that scenario ?

    Edit: I realised that he's checking for ufw, and then using &&. I should really read before I comment huh ?

  2. I was taught many, many, many, moons ago in the 80's to use 80 characters in you .Bat files. I still do that to this day in Bash.
    I have all my editors set to 80 and not 120 as they come pre-set…
    Lots of good suggestions and examples and not being to criticizeing at all, just good points, at least to me.
    So does it help if I said I watched this video at 2:30 am here in Indiana… Lol I think we both need to go and get some rest now… LOL
    Thanks my friend for the video!

  3. I really just came here to say that Luke is an obnoxious little fascist and that i am amazed that someone is able to be that ignorant wit so much confidence.
    Remember when Trump' s FCC repealed the net neutrality rules and Luke was so eager to gargle on his balls that he made a whole video explaining how actually the end of net neutrality would be the best thing to ever happen to the internet?

  4. 3:30 I was being super blonde around this point. I planned to edit that part out, but forgot. Lol 3am video, remember.

    I've just stumbled across a great way to remove all but the final newline with sed(1), but I can't figure out how to remove all including the last one. Nonetheless, this is badass, so here it is:

    … | sed ':start; N; $!b start; s/n//g'

    I'm not 100% sure how it works yet, but once I've (hopefully) figured it out, expect a video on it. What I can tell you, is that `N` appends the next line of input into the pattern space. The `s/n//g` is the usual substitution to globally remove newlines. The `:start` defines a label (like in PERL and old languages like BASIC). `$!b start` seems to be some kind of `goto`, but I'm not sure how `$!b` differs from `b` (some kind of branch) or `t` (some kind of test) and `$!t` as I've also seen, as in this, much slower (don't use this) example:

    … | sed ':start; N; s/n//g; t start'

  5. I think it would be interesting if you did a fan code review where you review tiny fan script (< 200 lines or 100 lines) from a community post or something at some point.

    By the way I might be wrong or this might just be a dash thing, but I think you can use the <<-EOF thing in sh as well (someone please fact check me in case I'm wrong)

  6. You should create a video where you lay out some good design principles for creating shell scripts, regardless of which shell you are using. Overarching general principles that can guide a person to create clear, efficient scripts.

Leave a Reply

Your email address will not be published.