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

help-circle
  • 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.






  • we’ve got a foosball table in my office, and while it obviously wouldn’t make the difference between staying and not if the pay wasn’t already good and the job wasn’t something I liked I do enjoy getting to play foosball.

    I’m at a pretty flat company though with a very laid back leadership. I’ve even had managers pull me out of a call in order to play foosball lol.

    whenever I decide to be in the office, I think I get in one to three games during the day? something like that.


  • yeah I mean I would consider myself left of most of the Democratic party but you can take a look at their weightings on the metrics they used and you can see why they got the answer they did even if we’d quibble about specific state placement.

    cost of doing business and business friendliness collectively makeup 20% of their weighting and cost of living and education only make up 7% total.

    seems like on a list that focuses on inclusivity that they would also focus on basic needs for families but for some reason they valued basic needs for businesses at 3x families.

    overall, I think in order to trust this list, I would need to lower focus on businesses and increase focus on things such as education and immigration. Texas would do poorly in both of those things but so would a lot of other states. I definitely believe it deserves a place on this list, but I don’t think it would end up #1.

    they’re methodology summary:

    • Workforce (400 points – 16%)
    • Infrastructure (390 points – 15.6%)
    • Economy (360 points – 14.4%)
    • Life, Health & Inclusion (350 points – 14%)
    • Cost of Doing Business (290 points – 11.6%)
    • Technology & Innovation (270 points – 10.8%)
    • Business Friendliness (215 points – 8.6%)
    • Education (125 points – 5%)
    • Access to Capital (50 points – 2%)
    • Cost of Living (50 points – 2%)