Skip Navigation
korthrun Korthrun

*NIX enthusiast, Metal Head, MUDder, ex-WoW head, and Anon radio fan.

Posts 1
Comments 54
How do you check if a file ends in a certain file extension in bash?
  • That's my bad, I asked an incomplete question.

    What does the approach of spawning a grep process and having ls send ALL of it's output to grep have over just passing a glob to ls?


    $ ls /usr/share/*.lm
    /usr/share/out-go.lm  /usr/share/ril.lm     /usr/share/rlhc-crack.lm   /usr/share/rlhc-d.lm   /usr/share/rlhc-java.lm  /usr/share/rlhc-julia.lm  /usr/share/rlhc-ocaml.lm  /usr/share/rlhc-rust.lm
    /usr/share/ragel.lm   /usr/share/rlhc-c.lm  /usr/share/rlhc-csharp.lm  /usr/share/rlhc-go.lm  /usr/share/rlhc-js.lm    /usr/share/rlhc-main.lm   /usr/share/rlhc-ruby.lm
  • How do you check if a file ends in a certain file extension in bash?
  • What's the purpose of a pipe and an execution of "grep" here?

  • How do you check if a file ends in a certain file extension in bash?
  • What's the benefit of spawning a subshell and executing "ls" here instead of just passing a glob to your loop?

    $ for lol in /usr/share/*.lm;do printf "I found a file named '%s'\n" "$lol";done
    I found a file named '/usr/share/out-go.lm'
    I found a file named '/usr/share/ragel.lm'
    I found a file named '/usr/share/ril.lm'
    I found a file named '/usr/share/rlhc-c.lm'
    I found a file named '/usr/share/rlhc-crack.lm'
    I found a file named '/usr/share/rlhc-csharp.lm'
    I found a file named '/usr/share/rlhc-d.lm'
    I found a file named '/usr/share/rlhc-go.lm'
    I found a file named '/usr/share/rlhc-java.lm'
    I found a file named '/usr/share/rlhc-js.lm'
    I found a file named '/usr/share/rlhc-julia.lm'
    I found a file named '/usr/share/rlhc-main.lm'
    I found a file named '/usr/share/rlhc-ocaml.lm'
    I found a file named '/usr/share/rlhc-ruby.lm'
    I found a file named '/usr/share/rlhc-rust.lm'
  • How do you check if a file ends in a certain file extension in bash?
  • File extensions are just a text based convention. Renaming a file to end in .PDF does not make the file a valid PDF.

    You're really saying there's no way for a posix shell to take the text to the right of the last "." character and then do simple string comparison on the result?

    Also why can't you just use normal globbing to feed arguments to your command? Why do you need to involve flow control?

  • Is ansible worth learning to automate setting up servers?
  • Configuration management and build automation are definitely worth the time and effort of learning. It doesn't have to be ansible, find which tool suits your needs.

  • If you want communism, you can start a commune
  • Ah yes, the core definition of communism: a small farm offering a delusion of independence, which is run within a capitalist system.

  • Livin' large
  • The AJFA book is full of nothing but lies. Buy another blunt or something instead ;p

  • Do you usually purchase digital or physical books? Why?
  • Same here. Reference, particularly sheet music and cooking recipes work fine for me digitally.

    I can sit at the computer and read social/news media for hours with no problem, but the way ebooks are displayed tires my eyes very quickly for some reason.

    While I don't have this issue with the e-ink/e-paper stuff, I've never owned one. I also appreciate that physical books are often much harder to damage and will work without electricity.

  • The SIFF Cinerama has reopened!
  • This topic is addressed in the first paragraph on the linked page.

  • Self-Hosting Email - Software Recommendations?
  • I also have a small domain that is relatively low traffic. A lot of the "all in one" software on the list you linked looks pretty cool, I can't deny.

    What I found is that I make very few changes. I used to add mailbox aliases fairly often, but the fact is there are only two users and enabling the "+" syntax in addresses put a stop to me needing to make new aliases when I wanted a new address.

    I just don't feel like I need a management interface. Because of this I've just sort of frankensteined my own setup together and I love it. It operates how I expect it to, and enforces the standards I care about to the extent that I desire (e.g. which SPF result codes am I ok accepting?).

    • Postfix as SMTP/Submission server. I chose to go w/PAM based for outbound SMTP auth.
    • Courier for IMAPS
    • Dovecot for LDA (sieve is delightful)
    • Snappymail for webmail (served by apache httpd)
  • Filesystem Hierarchy Standard - Reference Poster / Cheatsheet [Added dark mode]
  • Bonus tip: Many distros make this info available on the cli by including a "hier" man page that you can read using the command "man hier".

  • Greater Morula by Dariusz Kieliszek
  • A+, would avoid hut at all costs.

  • *Permanently Deleted*
  • said the liar!

  • Woman buying pot from NYC deli maced, dragged by hair, kicked in head by cashier who mistook her for trans
  • There is literally an image of it happening in the linked article. Followed by more pictures that help make this make sense. That's how.

  • Do you guys know about soulseek
  • I have not bothered to give soulseek a shit yet, sorry ;p I will say that what mentioned are more general content than music specific.

  • recommendations for personal and family password management?
  • If cost isn't too much of an issue check out The Mooltipass or one of its competitors.

  • How do email scammers spoof my email?
  • you can set the “FROM” address to literally anything.

    Hey all, "that guy" chiming in.

    You can set the "FROM" address to any string that meets the specifications of the "Address Specification" section of the relevant RFCs (5322 and 6854, maybe others). Which is SUPER FAR from "literally anything".

    I know this seems like some neck-beard bullshit, but we're here answering the question for someone who clearly has little understanding of email internals. Hyperbole is bad in this context IMO.

  • What bugs the heck out of you at work but doesn't seem to bother your coworkers?
  • An absolute lack of consideration in regards to chat etiquette. Man now that I think about it, it's chat threads/notification in particular.

    People who carry on side conversations in threads. You're giving everyone else who has participated in the thread the choice of "disable notifications for this thread and risk missing something relevant come back around, or get a notification for every single side message they're sending". Especially when someone is chiming in like 4 hours later. "Glad you guys got this sorted out". Yes, all 12 of us on-call people in this thread needed to get that message direct to our phones at 3a.m. 4 hours after the outage has been resolved. Thanks for that. Very fucking helpful. High value communication.

    People who will not use threads. I don't need a new fucking notification every 20 seconds because you guys are deciding to have a chat about e-bikes. Make a goddamn thread or use a room made for chit chat, we're all on the same team, we're all in on-call positions. I'm paid to respond when this thing makes a noise. I am NOT comfortable muting the team channel.

    It's addressed elsewhere in these comments, but +1 to folks who just message you "hi". Go get stabbed.

    On the topic of notification fatigue:

    People who will just not finish a thought.
    Before hitting their enter button.
    So they end up like doing this thing.
    Where you get a notification every 15 seconds, because they are just absolutely addicted.
    To their enter key I mean.
    They are addicted to thier enter key.
    I guess I could have just edited that message instead of sending the correction with the thing.
    Asterisk? Asterisx? I forget what it's called.
    Anyway, that thing.

    Also, when I'm helping you I am 100% going to stop what I am doing every time I get a message and read the message. There's no way for me to know whether or not you're messaging me "Oh never mind, I had a typo" or "here is more relevant info to make your work easier". That message may very well have immediate impact on what I'm doing, and affect the course I take. Of course I'm going to stop what I'm doing to read it. So maybe don't wait 5 minutes to send me the message "k" after I kindly, thoughtfully provide you with the status update "I think it's the fizzibob, let me verify in the logs real quick" of my own volition so that you are not only aware of what's going on, but don't have any question as to whether or not your question is still being looked at.

  • Weekly c/GuildWars2 Question Post - Week 35, 2023
  • Well logged in tonight and had the exact opposite experience for the first time since release day.

    I think I may have just been unlucky with my time / zone choices.

  • Weekly c/GuildWars2 Question Post - Week 35, 2023
  • My question is: What is it that I'm not understanding?

    I'm really hesitant to be that twat shouting "Dead Game". We're still very fresh into a new release, I know that's not true. I can look up server population estimates. It's obviously not an accurate statment.

    I am having a helluva time finding activity on the new maps. Commander/Mentor tags disappear seconds after I notice them. Events are over/failed by the time I arrive at the markers. Meta is consistently not getting completed. I hardly even cross paths with other players on these maps. They legit feel lonely and empty to me.

    Yet when the daily is "Complete a renown heart" I can hop over to Kourna/Jahai and find activity no problem.

    I'm on Gate of Madness fwiw. Is it my time zone/playtime? Are my expectations off? Am I just not getting how the new maps work?

    I'm not looking to mindlessly follow a zerg for 100% of my playtime, but it's been really hard for me to do any of the content that isn't readily soloable. Despite what I know to be true (lots of folks are playing this expansion), what I'm able to observe is that I'm often the only player I see around these zones when I'm playing.

  • Early 80s ballad tone Have a goodnight Imgurians!

    Discover topics like awesome, wholesome, current events, music, and the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users like HorrorMango.

    In the last 15 seconds of the song I've linked to there's a guitar solo with a super cheesy early 80s tone that I love.

    I'm curious what's typical for this sort of sound. I've just recently started trying to take more active/conscious control of tone so my ear for this stuff is weak. I think I hear some flanger, light to mid gain, and a lot of delay, but that's about all I got.