News for hackers. Stuff that matters.
Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @04:43AM (#29538166)
Most of the justifications for using collections of command-line Unix tools are no longer valid today. Instead you should be using a proper programming language.

Note that people who still do use complex solutions built from cat, head, cut, etc, and who know what they're doing, will typically either write a shell script (which won't be structured particularly differently from the equivalent Python or whatever) or will rely heavily on awk (itself a full-featured programming language, no easier to learn than any other scripting language), or both.

One-liners which pipe text between four or five different commands are the equivalent of hand-soldered boards or bitwise arithmetic. Interesting to learn about for historical reasons but of no practical utility.

The use of things like xargs and jq in this solution, difficult to invoke Unix utilities for doing things that are trivial in any reasonable language, makes this even more clear.

Re:Cheating at a company group activity using Unix tools by gattilorenz on Monday December 13, 2021 @06:08AM (#29538546)
> Most of the justifications for using collections of command-line Unix tools are no longer valid today. Instead you should be using a proper programming language.

That's just, like, your opinion man...

> people who still do use complex solutions built from cat, head, cut, etc, and who know what they're doing, will typically either write a shell script or use awk

No, I still use cat, head, cut etc., because it's easier to see at each step what is happening and incrementally add to that, because they're literally everywhere, because it's quick, and because I like it. Not for major projects, granted, but why would I need to write a python file for something that takes a single line of piped commands?

Re:Cheating at a company group activity using Unix tools by unixbane on Monday December 13, 2021 @08:46PM (#29547185)
It's not hard: Imagine if your terminal executed Python repl instead of bash shell. Literally anything is better than bash. It's amazing how people still haven't figured out bash is basically PHP.
Re:Cheating at a company group activity using Unix tools by gattilorenz on Tuesday December 14, 2021 @02:15AM (#29549096)
> Imagine if your terminal executed Python repl instead of bash shell.

Ugh.

Re:Cheating at a company group activity using Unix tools by pkrumins on Monday December 13, 2021 @06:16AM (#29538581)
Amen.
Re:Cheating at a company group activity using Unix tools by 2143 on Monday December 13, 2021 @09:50AM (#29540046)
> Most of the justifications for using collections of command-line Unix tools are no longer valid today.

Why is it not valid today?

> One-liners which pipe text between four or five different commands are the equivalent of hand-soldered boards or bitwise arithmetic.

Why is that bad? Don't deploy a supercomputer to do what a hand soldered board can. Keep it simple.

I don't see how you equate piping commands to bitwise arithmetic, but bitwise arithmetic is easy anyway.

> but of no practical utility

Says you. Just because you don't find something useful doesn't mean nobody else finds it useful.

Turning one liner piped commands to a program in what you might consider a "proper programming language" usually ends up turning a declarative program into something prodecural. Not that that's necessarily a bad thing. Just saying.

Use the right tool for the job. In some cases (not all) the shell is indeed the right tool.

I get a feeling you don't understand the Unix philosophy. Read The Art of Unix Programming by Eric S. Raymond. Go learn bitwise arithmetic.

The uneducated play with pictures. Educated people read and write :)

Have a great day (or night, depending on your timezone — night here).

Re:Cheating at a company group activity using Unix tools by Chris2048 on Wednesday December 15, 2021 @06:23AM (#29564478)
> I get a feeling you don't understand the Unix philosophy. Read The Art of Unix Programming by Eric S. Raymond. Go learn bitwise arithmetic.

These kind of comments aren't useful, and come off smug to me.

Why doesn't he understand something, what it the point in reading/learning something you think relevant? Why would they invest in your suggestions if you don't provide any reasons what is missing?

Also:

> The uneducated play with pictures. Educated people read and write :)

This sounds insulting to me (name-calling), and passive-aggressively so when combined with "Have a great day".

Re:Cheating at a company group activity using Unix tools by Chris2048 on Wednesday December 15, 2021 @06:20AM (#29564451)
> Turning one liner piped commands to a program in what you might consider a "proper programming language" usually ends up turning a declarative program into something prodecural.

I don't understand - isn't bash shell procedural?

Re:Cheating at a company group activity using Unix tools by pkrumins on Monday December 13, 2021 @06:04AM (#29538533)
Sir, you are absolutely and totally wrong. No sysadmin has time or interest to write programs or use "proper programming languages" to get the job done. Sysadmins know their tools and are fast and efficient. Zero sysadmins will ever write "proper programs" when they can pipe find, sed, and awk.
Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @07:46AM (#29539047)
Yes, but the number of sysadmins in the world is converging rapidly to zero. Mainly because the invisible overhead of having your boxes managed by people who use sed and awk is much higher than the alternatives (containerisation, cloud vendors, cattle not pets, infrastructure as code).

I think you actually confirmed my point when you said 'no sysadmin has time or interest'. I didn't say that no one uses shell anymore. I said that there was no practical justification for doing so. Lots of people still use it and don't have any interest in finding a better solution. These people are choosing, for their own reasons, to double down on an obsolete skillset. Good for them, I suppose, but I don't think that demand for their niche is going to be around for very long.

I also pointed out that sysadmins who know what they're doing use awk. Based on your mentioning awk it seems like you agree with this.

Re:Cheating at a company group activity using Unix tools by ozim on Monday December 13, 2021 @10:31AM (#29540447)
I care to disagree because you just move one abstraction layer higher and again you will use sed and awk.

To move stuff to that cattle and to maintain cloud environments, to prepare k8s clusters and manage those. To create docker images or to maintain servers that are running k8s.

You still have AWS console and Azure CLI or GCP console and configurations that need to be search/replaced. You still need to parse logs to understand what is happening in multiple environments, which I would say makes it even more important to be good with unix-fu because you have to find that one broken cow to put it out of misery.

Those command line tools are still useful and used.

Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @12:07PM (#29541560)
Did you read or understand my original comment?

I specifically named awk as a way of solving these type of problems that has a similar applicability and maturity to a scripting language. My real objection is to long chains of cut, head, cat, grep, and so on. I also think that utilities like jq and xargs, which were invented exactly to allow people to do things in shell one-liners which are trivial in a proper language, are worse than useless.

I didn't say that no one should use awk, or no one should use the command line.

In fact I didn't say that no one should use pipes with head, cut and grep either. I just said that most reasons to use them were no longer valid.

Re:Cheating at a company group activity using Unix tools by turtlebits on Monday December 13, 2021 @11:28AM (#29541075)
You don't need to be a sysadmin to take advantage of CLI tools. Anyone that needs to manage files and/or the contents of them can benefit.
Re:Cheating at a company group activity using Unix tools by DarylZero on Monday December 13, 2021 @12:03PM (#29541511)
>containerisation, cloud vendors, cattle not pets, infrastructure as code

Lots of shell script in that part of the code world.

Re:Cheating at a company group activity using Unix tools by unixbane on Monday December 13, 2021 @08:55PM (#29547240)
> Sysadmins know their tools

This is false. Every line they write has potential security implications. If any pattern can become a string injection vulnerability, it will. Even most real programmers do not understand shell scripting.

This discussion is all moot because UN*X is an obsolete misconception made by programmers who are too dumb to understand the difference between and significance of AST manipulation and string concatenation. It's not hard to understand what I'm talking about. Look how much ad-hoc, non-reusable trivia you have to learn to pass stuff around between find, ls, and xargs. Whenever you would do `x = f(); g(x)` in Python, you will spend 10 minutes figuring out if some given shell script is doing the equivalent the correct, safe, secure way.

I just realized today that every time I see some crap like x,abc%%20%%20def,y x,abc\x20\x20def,y I am actually depressed because I already know all the played out meta of such systems - it's a bunch of half working junk full of pointless vulns that only exist because between 0 and 10 of the said "experts at their craft" in the world actually bother to program this crap correctly. And I literaly have to squint to figure out where the bug is (there's always the bug in such code).

If the UN*X shell was replaced by Python, sysadmins would have no trouble adapting. Python is a terrible language, (plus this discussion is convoluted by the fact that Python's gimped from bending over to work well with UN*X) but still better than UN*X shell in every way.

Re:Cheating at a company group activity using Unix tools by akho on Monday December 13, 2021 @08:38AM (#29539456)
> Instead you should be using a proper programming language.

Why use many word when few word do trick?

Shell scripts are very compact for what they do, and generally as clear as a similarly quick-and-dirty solution in another language. Ease of learning and use comes from having used the programs you are running in your script. E. g. my small script piping stuff from nmcli to fzf so I can choose a wifi network would be much more difficult to write in Python: I’d need to find a Python library for interacting with NetworkManager, and a library for interactively fuzzy searching in a list, read the docs, spend a while setting up a venv to run it, … I don’t have time for any of that.

xargs, in particular, is not difficult to invoke once you’ve done it once or twice, and does a lot. Apart from just being a loop, it also parallelizes execution, and can ask for confirmation from the user for each invocation. Implementing either of these features will take you more than 2-4 chars you need to use it with xargs.

Re:Cheating at a company group activity using Unix tools by hawski on Monday December 13, 2021 @05:54AM (#29538475)
Shell is a very high level language that is undoubtedly bizarre at times. Its routines can be written in any programming language you want without much of a boilerplate or any special bindings, because supporting for command line arguments, environment variables, reading and writing files is a bare minimum that most languages support. It is a tradeoff - it has its immense advantages and a couple of often hard to navigate disadvantages. But the ability to easily compose whatever you want is something you can't ignore.

I think the perfect very high level language is closer to shell than to python for example. The power of Tcl/Tk (still it has some big weaknesses) or Rebol/Red is something that I admire.

The following statement is probably controversial: shell is more akin to Lisp for human beings. I dabbled at Scheme, but it is harder for me to grasp than Shell, but in the end they are more similar than not.

I hold a candle for Oil shell for example.

Re:Cheating at a company group activity using Unix tools by flohofwoe on Monday December 13, 2021 @05:53AM (#29538469)
Fundamentally it's the same thing. The UNIX tools are the "batteries included" standard library of the integrated shell programming environment. And if you need to extend that library you quickly whip up a new minimal command line tool in C (or any other language which allows to write small and quick and dirty command line tools, like Python).

The only downside of shell scripting is that it isn't trivially portable to Windows (or even macOS because of the differences between GNU and BSD tools), so it often makes sense to create big Python scripts that do more than "one thing right". If the whole world would run on UNIX, shell scripting would make much more sense.

Re:Cheating at a company group activity using Unix tools by actually_a_dog on Monday December 13, 2021 @12:13PM (#29541653)
> The only downside of shell scripting is....

The only downside? Let's add that no major *NIX shell that I'm aware of has any good way to modularize code while enforcing encapsulation of state.

At my previous job, we had a rule that any shell script longer than about a page of code had to be replaced with a Python script ASAP. That was a good rule, IMO, because once you've exceeded a certain size, a shell script starts getting brittle and hard to work with. I don't know if 1 page of code is the threshold size or not, but it seems like as good a cutoff as any.

Re:Cheating at a company group activity using Unix tools by herbst on Monday December 13, 2021 @05:02AM (#29538247)
This is only partially true. Working on your own machine this may be fully the case, but debugging and maintaining random servers is a complete different beast.

Shell is portable in a way nothing else is, same reason people use Excel instead of code or PHP instead of literally anything.

Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @05:43AM (#29538417)
Firstly the model of sshing into your server and trying to run commands on it directly is more or less obsolete.

Secondly the presence of all these utilities on a machine is far from guaranteed - expecting Python to be present is no more or less likely.

Re:Cheating at a company group activity using Unix tools by cranekam on Monday December 13, 2021 @06:46AM (#29538736)
> Firstly the model of sshing into your server and trying to run commands on it directly is more or less obsolete.

Why do you get to declare what is acceptable (using UNIX tools) or what's now obsolete (SSHing into a host)? It's rather presumptuous to believe you can speak for everyone. Perhaps you only ever deploy code using k8s and never need to use a command line but that doesn't mean we all do. There are many reasons one would use these tools and approaches (fun, small scale, investigating problems, anything).

[dead]
Re:Cheating at a company group activity using Unix tools by cranekam on Monday December 13, 2021 @11:24AM (#29541010)
head in hands

For what it's worth, my bosses all the way up to CEO of a 50k person company were all pretty pleased with the working practices I used (medieval things like strace(1), perf(1) and sort(1)) to save thousands of servers' worth of CPU. I'm not advocating for editing code live over SSH but there are still plenty of legitimate reasons to SSH into a server and use UNIX tools.

Since you're clearly trolling I'll leave it here.

Re:Cheating at a company group activity using Unix tools by herbst on Monday December 13, 2021 @08:04AM (#29539174)
My boss (me) doesn't mind me dabbling around in my servers via SSH. Not everyone of us works for evil cooperate.
Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @09:03AM (#29539625)
That's fine but you are proving my point. I didn't say that no one uses shell, just that there aren't good practical reasons for doing so.

Of course lots of people do it because they enjoy it or are used to it, and for them cost and related considerations don't matter. The same way that lots of people ride horses.

Re:Cheating at a company group activity using Unix tools by spekcular on Monday December 13, 2021 @09:06AM (#29539650)
How is it obsolete? This is an honest question. I SSH into the personal server hosting my website and tweak things all the time. If there's an easier way to get things done – let me know!
Re:Cheating at a company group activity using Unix tools by oblio on Monday December 13, 2021 @09:10AM (#29539692)
At a higher level of operation, companies are switching to immutable infrastructure.

So you don't need to SSH to debug, you'd just re-deploy another container or something.

However, there's an <<extremely>> long tail of places, equivalent to mom and pop stores, where SSH will still be in use for a long, long time. I include antiquated banks or government in "mom and pop stores" for the purposes of this discussion :-p

Re:Cheating at a company group activity using Unix tools by jyounker on Monday December 13, 2021 @06:06PM (#29545912)
> So you don't need to SSH to debug, you'd just re-deploy another container or something.

I've still never seen a place where this was true.

At some point you always run into a situation where you need to see what's happening inside the container in production at a level of detail that isn't available except by directly connecting. So you attach a sidecar with SSH, or you deploy a debug version of your container that runs SSH, and then you SSH into your container and see what's happening.

Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @11:56AM (#29541391)
I mean, the example you gave of what you use ssh for is itself an obsolete function. Using a personal Unix server to host a personal website is not really any different than making your own clothes using a sewing machine. It is perfectly fine - but it's a niche activity done by hobbyists who enjoy the process itself.
Re:Cheating at a company group activity using Unix tools by spekcular on Monday December 13, 2021 @12:26PM (#29541815)
How should I be hosting my website then? Suppose for the sake of an example it's some simple custom HTML, CSS, and a few javascript math apps. I don't enjoy the process, I just need the damn website online.

(Again – an honest question! I was never formally instructed in these matters.)

Re:Cheating at a company group activity using Unix tools by flohofwoe on Monday December 13, 2021 @05:58AM (#29538506)
First, Python2, or Python3, if Python3, what incompatible version exactly? And what's the executable name, python, python2, python3?

On macOS, there's still only Python 2.7 pre-installed (Xcode then goes ahead and also installs an equally outdated Python 3 version). On Windows the Python executable is an empty stub which opens the app store.

I wish the situation would be better.

Re:Cheating at a company group activity using Unix tools by microtherion on Monday December 13, 2021 @08:12AM (#29539237)
I would argue, however, that the situation for shells is even worse, as:

1. The version of bash is even more out of date (Dating back to 2007 on current macOS releases).

2. #!/bin/sh Could give you any one of a number of slightly different shell implementations.

3. The differences between Python versions are clearly documented, and, while painful, possible to work around. The differences between shell versions can be far more subtle and more difficult to discover.

4. You not only need to deal with the shell version, but the version of every tool you use as well.

Re:Cheating at a company group activity using Unix tools by devenvdev on Monday December 13, 2021 @05:46PM (#29545684)
I would argue that in practice, the only difference between implementations was an inconvenience to me was on Mac - I have to use gsed instead of sed, etc. Everywhere else, it's pretty much consistent from the one-liner user POV. On the other hand, I occasionally encounter different python versions, which always includes some mental effort to tune in.
Re:Cheating at a company group activity using Unix tools by microtherion on Monday December 13, 2021 @09:19PM (#29547409)
What kind of ecosystem are you operating in outside of macOS? If you're operating in a Linux monoculture, I'm sure your experience is quite realistic, but historically, there were several different sed's (of which the fact that macOS uses BSD sed by default is a reminder), several awks, several bourne-like shells (some of which still exist, optimized for either better interactivity or smaller footprint).
Re:Cheating at a company group activity using Unix tools by oblio on Monday December 13, 2021 @09:11AM (#29539702)
> On Windows the Python executable is an empty stub which opens the app store.

As opposed to trying to directly launch /bin/sh on Windows? :-p

Re:Cheating at a company group activity using Unix tools by high_5 on Monday December 13, 2021 @05:34AM (#29538385)
> Interesting to learn about for historical reasons but of no practical utility.

The practical utility has just been demonstrated in this particular article? Historical? I think that Unix shell are like crocodiles - outliving the dinosaurs and lurking in the murky water the unsuspecting sysadmin to come close enough to fix the script that ain't broken.

Re:Cheating at a company group activity using Unix tools by oblio on Monday December 13, 2021 @09:12AM (#29539711)
Your analogy is quite interesting, in the sense that crocodiles are around, but they're not the dominant species. That would be an interesting continuation to your analogy, actually.
Re:Cheating at a company group activity using Unix tools by high_5 on Monday December 13, 2021 @10:34AM (#29540480)
Sooner or later one has to take a sip from the unixy pond :-)
Re:Cheating at a company group activity using Unix tools by oblio on Monday December 13, 2021 @10:37AM (#29540513)
For now. At some point we're going to build proper water management and sanitation systems. What those are in the software world, I, as a swamp dweller, cannot say.
Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @05:41AM (#29538407)
> The practical utility has just been demonstrated in this particular article?

How? The author is doing something which could be done much more easily and elegantly in a programming language.

Re:Cheating at a company group activity using Unix tools by smitty1e on Monday December 13, 2021 @07:21AM (#29538926)
> command-line Unix tools are no longer valid today

Strongly disagree. The understanding of the OS, the data, and how to checkmate the problem with minimal effort is timeless.

Programming languages are relatively ephemeral compared to POSIX utilities.

Invest in knowledge of the enduring.

Re:Cheating at a company group activity using Unix tools by spekcular on Monday December 13, 2021 @09:09AM (#29539684)
I don't understand why you're being so harshly downvoted. This seems ... plausibly correct to me?

Some questions:

1) Where do you draw the line, and move away from shell to a "real" language. If I just want want to view a directory, surely I use ls, right? What about if I want to remove all leading whitespace from a text file? This can be done with a short but fairly opaque awk one-liner. Probably takes way more time to write and run the Python equivalent, but I don't know Python so well, so maybe it's also a one-liner.

2) What's the optimal "real language" for replacing shell? Python? Perl? Raku?

2a) xargs automatically parallelizes programs. How can this be done efficiently (meaning I don't have to write much additional code) in your proposed "real language"?

Re:Cheating at a company group activity using Unix tools by dagw on Monday December 13, 2021 @09:25AM (#29539819)
xargs automatically parallelizes programs. How can this be done efficiently (meaning I don't have to write much additional code) in your proposed "real language"?

By using xargs :)

Or more likely gnu parallel. But seriously, in so many cases using GNU parallel to parallelize a process is the quickest and easiest way to approach the problem, and I use it all the time. If I need to process 10k+ images in a folder, rather than try to parallelize the process in my python/C script I'll write the fastest possible single threaded script that takes its input args as command line arguments and then uses gnu parallel to distribute the workload. The added advantage is that I can distribute this work on a cluster of machines with only a few changes to GNU Parallel's command line arguments.

Re:Cheating at a company group activity using Unix tools by actually_a_dog on Monday December 13, 2021 @12:20PM (#29541746)
We had a rule at my old workplace that any shell script that's over a page of code was to be replaced with a Python script. We chose Python because guaranteed there would always be an up to date version of Python on any cloud machine we used, but you could certainly make a case for some other language. In a vacuum, my choice might be Scheme.
Re:Cheating at a company group activity using Unix tools by Kinrany on Monday December 13, 2021 @06:41AM (#29538718)
No "proper programming language" is capable of ergonomically piping between programs.

Shell is indeed very old and it's time for a replacement, but it's not there yet.

Oilshell might get there eventually or at least spark interest in this area.

Re:Cheating at a company group activity using Unix tools by ilyash on Monday December 13, 2021 @08:24AM (#29539333)
> No "proper programming language" is capable of ergonomically piping between programs.

Solved. https://github.com/ngs-lang/ngs

I'm the author. Frustrated with exactly this situation I created Next Generation Shell. It's a "proper programming language" on one hand but domain-specific for "DevOps"y scripting on another. So sane syntax, data structures, error handling, multiple dispatch on one hand but also syntax for running external programs, pipes and redirects.

You are welcome!

Re:Cheating at a company group activity using Unix tools by unixbane on Monday December 13, 2021 @09:18PM (#29547402)
*sh is only ergonomic if you're using it insecurely. wait, even then it's not ergonomic. you're just insane. the day i figured out about python repl over 10 years ago, i realized *sh is utterly obsolete (and python isn't even good, a repl like that just gives you some perspective of how things could be).
Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @08:57AM (#29539592)
> No "proper programming language" is capable of ergonomically piping between programs.

You cherry-picked the one thing that shell script is somewhat better at than other languages (not even really needed for this task). Meanwhile the article uses shell for both making HTTP requests and mangling JSON data, both of which are easy in all modern languages, and extremely painful in shell.

Re:Cheating at a company group activity using Unix tools by actually_a_dog on Monday December 13, 2021 @12:21PM (#29541758)
It's not cherry picking to mention the thing that makes a fundamental component of the UNIX philosophy work.

> (ii) Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input.

https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s...

Re:Cheating at a company group activity using Unix tools by ccalloway on Tuesday December 14, 2021 @10:16AM (#29552431)
OK, the Unix philosophy holds that this is one of the most important things, and therefore it's easy to do in shell.

But what if it's not? It's perfectly easy to write code to do the same thing in a programming language without invoking any other executables, let alone piping the output of one into the input of another. So the claim that this functionality is what makes Unix and shell scripting effective is vacuous. They are good at doing something which would not be necessary if one was not using them.

Re:Cheating at a company group activity using Unix tools by Kinrany on Thursday December 16, 2021 @09:07AM (#29578218)
Being able to compose programs is not a necessity, but it saves effort. A single pipe replaces M*N different programs with M+N different programs. This is how Unix won.
Re:Cheating at a company group activity using Unix tools by 3np on Monday December 13, 2021 @06:09AM (#29538551)
I guess it depends on what you do. For a subset of tasks, shell scripting is a lot faster to implement than the equivalent python/js/go/ruby/rust.
Re:Cheating at a company group activity using Unix tools by Lamad123 on Monday December 13, 2021 @05:07AM (#29538271)
I heard awk is extremely fast, much faster than Python.
Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @07:43AM (#29539036)
Yes, but execution speed (of things like creating a lookup table from the second and third fields in each line) is rarely the operative constraint.
Re:Cheating at a company group activity using Unix tools by jes on Monday December 13, 2021 @09:26AM (#29539836)
What is most often the operative constraint?
Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @11:56AM (#29541388)
Time spent maintaining your script by your future co-workers.
Re:Cheating at a company group activity using Unix tools by revscat on Monday December 13, 2021 @12:00PM (#29541439)
It is, but it's much closer to perl when it comes to maintainability.
Re:Cheating at a company group activity using Unix tools by hansel_der on Monday December 13, 2021 @07:52AM (#29539100)
i heard python is among of the slowest
Re:Cheating at a company group activity using Unix tools by smcameron on Monday December 13, 2021 @09:50AM (#29540052)
This is akin to saying if you want to hang a picture in your house, you shouldn't just grab a hammer and a nail, instead, you should get a nice piece of wood, and a nice hunk of metal, go to the workshop, fire up the forge, the mill and various wood and metal working machines, and forge a special picture-hanging-hammerer-thing.
Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @12:00PM (#29541448)
Umm, no, chaining together 5 or more somewhat arcane single-purpose tools is the unrealistic solution here.

If the article was about using ls to just list files, and I had said "actually you should use Python's os.listdir() and filter the results by whatever" you would be right.

For most simple problems it's correct to use a simple tool. For the overwhelming majority of complex problems you should use a well-understood, well-designed, common general-purpose tool.

Re:Cheating at a company group activity using Unix tools by pessimizer on Monday December 13, 2021 @12:13PM (#29541660)
What's supposed to be the difference between chaining simple UNIX commands and chaining simple python functions again?
Re:Cheating at a company group activity using Unix tools by Chris2048 on Wednesday December 15, 2021 @07:09AM (#29564855)
How many executables do the two methods require? Do all those executables/programs share a common type system?
Re:Cheating at a company group activity using Unix tools by ccalloway on Tuesday December 14, 2021 @10:13AM (#29552386)
For example, the latter is testable.
Re:Cheating at a company group activity using Unix tools by aulin on Monday December 13, 2021 @09:42AM (#29539971)
wait, what's wrong with hand soldering and bitwise arithmetic? hand soldering is still of very much practical utility for building prototypes, small production batches, electronics repair... Bitwise arithmetic... seriously? tell that to an embedded developer or anyone who works with low-level stuff.
Re:Cheating at a company group activity using Unix tools by ccalloway on Monday December 13, 2021 @12:03PM (#29541509)
Nothing is wrong with them if 1) you have a specifically suited, niche problem and you understand the complexities and tradeoffs of the tool OR 2) it's not a critical requirement to solve the problem using modern, efficient tools AND you want to use something else for fun or learning or whatever.

If this isn't the case, stay away.

Re:Cheating at a company group activity using Unix tools by aulin on Monday December 13, 2021 @08:59PM (#29547263)
Either you're just trolling at this point OR you haven't the slightest idea of what you're talking about.