3 ms·
The best thing about dd is the argument system. I like the key=value format. It feels better to me. I think dashed arguments, that is, getopt style, just add u
by somat 4y ago
The best thing about dd is the argument system. I like the key=value format. It feels better to me.
I think dashed arguments, that is, getopt style, just add unnecessary noise. This is usually not so bad. But gets pretty annoying when you have an actual language exposed in the args, I'm looking at you iptables. in iptables the readability would be far improved if they had just left off the dashes.
Then there is the unholy abomination that is --key=value what is that -- prefix doing for anyone?, just drop it and use dd style key=value args and everyone(ok perhaps just me) will thank you.
So my conclusion is, ditch cat and just use dd.
The bonus is that dd works in both modes: file to pipe, and pipe to file, downside is that dd can't concatinate files. but who actually does that(joke).
- Lio 4y agoI have a terrible memory for things I use infrequently so personally I value consistency over syntax tweaks. Eventually you'll probably need both but I think the point of the article is that being closer to the Unix/POSIX way will give you more reusable knowledge. That's certainly true when you're starting out at least. The more small tools you can combine without thinking too much about it the more usable Unix is.
- somat 4y agoThere is no consistancy in unix tooling, the best you can hope for is a good man page, if you are talking about how they all have dashes in front of the flags... I don't see how that helps. But you are right about the power of unix being that it is a very expressive system exposed in a fairly simple syntax. We have fallen far from the tree. But I think the real genius of the original unix was in what it did not do. there was a real desire to keep it a fun simple usable system. and it was and still is, as is proven by it's huge popularity and influence even today 50 years later.