this post was submitted on 23 Jan 2024
4 points (100.0% liked)

Programmer Humor

32060 readers
1395 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

Found while doing forensics on some rediscovered loose flash drives.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 7 months ago* (last edited 7 months ago)

What you’re showing here is an extra processing step, but I wouldn’t call that manual.

Yes, it’s not manual by the dictionary definition, but it is an extra step. This is another meaning of manual in my particular bubble [Edit: that I didn’t think to specify].

But a much better idea would be to use sensors -j to get json output, intended for machine reading, and pass that to jq.

This is my initial point, exactly. Dealing with objects is way easier than using the ‘default’ line-wise processing. Only Powershell made that the default, while in Linux you need to hope that utilities have an option to toggle it on – and then also have jq installed to process the objects.

I look forward to seeing how you would do this in PS. As I said previously, I don’t know it at all, so I’m not sure what you’re comparing this to.

[Edit, since I forgot to answer your main point:] I don’t program in PS. I don’t like the verbosity. But I do think MS has a point in pushing objects as the prime unit in processing instead of lines.