News for hackers. Stuff that matters.
Re:Useful sed scripts and patterns by yesenadam on Friday November 12, 2021 @02:46AM (#29197168)
I replied to someone's "There is no reason for anyone to program in C nowadays" recently on here with "But I like programming in C". They hadn't considered that reason in their mental survey of Every Possible Reason.

Also.. I use Awk every day, for all kinds of things. I forget the order of parameters in split, sub etc, which takes a few seconds to look up with man awk. I got into sed a while ago but never use it. Awk, together with sort and uniq sometimes, is all I need.

And it is interactive. You have an input. Print that out and look what needs to be done. Write the first transforming step in Awk. See what that did. Add the next step. See what that did. Extremely interactive. After a few minutes I have a one-liner (often 2 or 3 wrapped lines) that does exactly what I want, and easy to adapt to other similar things. I have very large bash history enabled so they stay Ctrl-R-accessible.

[dead]
Re:Useful sed scripts and patterns by dang on Saturday November 13, 2021 @02:46PM (#29212606)
Would you please not post in the flamewar style to HN, regardless of how provocative another comment was or you feel it was? This is not at all what we're trying for here.

https://news.ycombinator.com/newsguidelines.html

Re:Useful sed scripts and patterns by sitkack on Sunday November 14, 2021 @12:16AM (#29215494)
I don’t know what flame war style is, not playing dumb. I think the person behind the provocative comment isn’t much different than me.

I thought my comment might land ok, which due to a lack of response might have. It explained educated and <funny joke>

I might have typed the same thing in a different time.

*edit, it would be fun to have a forum board that allowed for out of band semantic information so … being cut off

Re:Useful sed scripts and patterns by dang on Sunday November 14, 2021 @03:36PM (#29220420)
Actually when I re-read your comment it doesn't seem so flamewarrish to me—sorry! a lot of the time I'm skimming these things in haste.

A couple bits that do correspond to 'the flamewar style', though, are when users start telling each other to "chill a bit"; and when people start arguing about "moving the goal posts and putting words in my mouth". It's a reliable sign of bad internet discussion when people start arguing about they are or aren't saying (rather than talking about whatever the ostensible subject was).