• 1 Post
  • 13 Comments
Joined 1 year ago
cake
Cake day: June 30th, 2023

help-circle

  • my wife and I are joint, just easier that way. what surprises me more is that someone would set up alerts for the low expense levels that would be triggered by Taco bell.

    I don’t really understand why folks would do separate it just seems like more trouble for no benefit unless there has been a specific reason or issues to trigger that.

    (for example my dad and stepmom had separate accounts after she spent so much one Christmas that I had to pay their rent)






  • so I actually had a friend years back who worked at a junkyard.

    I was hanging out there with him one time (definitely probably not smoking anything…) and he was still clearing things out.

    so he grabs a propane tank and brings it up to where he has an oxyacetylin torch, lights the torch and starts cutting into the tank.

    I about shit my pants and took off at least 50 ft back behind a car asking if he was trying to die today.

    apparently I was the one that didn’t know what I was talking about though because of a second later he cut through and it just popped a little flame.

    he just let that flame burn until it was out and that’s how he knew the tank was empty.

    apparently these things are very hard to blow up.






  • I use awk all the time. a very common and probably simplest reason I use it is it’s ability to handle variable column locations for data.

    if you know you always want the last field you can do something like

    awk '{print $NF}'

    but usually using it as for performing more advanced operations all in one go without having to pipe something three times.

    sure you can do grep cut grep printf, but you can instead do the pattern matching, the field, the formatting, whatever you need to all in one place.

    it’s also got a bunch of more advanced usage of course since it’s its own language. one of my favorite advanced one liners is one that will recognize if it is going to print a duplicate line anywhere in your output and prevent it. in cases where you don’t want to sort your output but you also want to remove duplicates it is extremely helpful and quick rather than running post-processing on the output in another way.

    all that said main reason I use it is because I know it and it’s fast, there’s nothing you can do in awk that you can’t do in Python or whatever else you’re more comfortable with. The best tool for the job is the one that gets it done quickly and accurately. unless your environment is limited and it prevents the installation of tools you’re more familiar with then there’s no real reason to use this over Python.


  • agree with one and two and younger me would have agreed with your third point but I think I don’t anymore.

    yes cut is the simpler and mostly functional tool you need for those tasks.

    but it is just so common to need a slight tweak or to want to substitute something or to want to do a specific regex match or weird multi character delimiter or something and you can do it all easily in awk instead of having to pipe three extra times to do everything with the simplest tool.