UNIX is about being generic. Yes, it means Apache and Varnish have different config file formats. But it also means that I already have the tools I need to automate my configuration so I don't have to care.
(Yes, Windows is programmable. But when you start having to compile software to automate your deployment, it becomes engineering and becomes a task of its own. Compare this to a quick command-line oneliner, and you'll see why people prefer UNIX. Engineering is about knowing how much you need to get something accomplished. Sometimes you do need to write highly-advanced configuration software. But other times, you don't. Windows doesn't give you that choice.)
Secondly, it's only true in the most simple cases that you can edit config files easily. First, all config formats are different - from the bizarre (Sendmail) to fairly sensible (Apache), but each one requires separate tools/scripts. Secondly, most of them are quite hard to automate - for example most config formats ignore white space, but writing a robust 'parser' in bash/sed/awk is a major pita and something you can never quite get right. (this is what I alluded to in my previous post). I don't see how you can say 'I already have most of the tools' - you need to learn the syntax and then write a complete program to parse the files. For example, you need somewhat of a state machine to parse/edit Apache VirtualHost directives. You need to write a complete editor from scratch each time.
I'm not sure what you mean with the last line. Just as with a properly set up make environment, you can compile a whole Visual Studio project with a single command from the command line. There is no way to do a bunch of things 'automatically' on Linux either (compile, run test, deploy, whatever), you still need to code them into your makefiles/deployment scripts.
(I've written software on and admin'ed Linux for coming on 15 years and I've written Windows software for over 10 - I have quite a bit of experience with both. They both have good and bad sides, and I run my personal servers on Linux myself. That said, the arguments used here against Windows are plain false and reek of Slashdot-style fanboyism).
The idea of diffing a registry dump fills my heart with horror.
> First, all config formats are different - from the bizarre (Sendmail) to fairly sensible (Apache), but each one requires separate tools/scripts.
I am quite happy editing them with vi or emacs (when available). I also like joe a lot - it reminds me of WordStar.
> you need to learn the syntax and then write a complete program to parse the files.
In about 10 years of Unix, I never had to build anything like this. And, when I wanted to parse my own config files, I always had libraries to do it ready.
> For example, you need somewhat of a state machine to parse/edit Apache VirtualHost directives. You need to write a complete editor from scratch each time.
I think you may be approaching the problem from the wrong angle. Are you trying to build a GUI tool to edit Apache configuration files?
Sure, so am I (well except for Sendmail configs). We were talking about programmatically editing here.
"And, when I wanted to parse my own config files, I always had libraries to do it ready."
Really? How do you, in bash, write a script to change, or if necessary add, an 'IndexAllowed' directive to a certain specific VirtualHost? Mind you, Apache config files can Include other files (and many distros ship with default config files that use this).
"Are you trying to build a GUI tool to edit Apache configuration files?"
I'm not building anything, I was just using this as an example of things you'd want to script, for example in the context of a web hosting provider who wants to automate the creation of new customer setups. (Yes I realize that there are many way to attack this specific problem, but most of them are very specific to Apache and would have to be re-engineered for each problem)
I am not sure it's a good idea. Just generating the files from a CMDB and placing them in the servers seems the simplest approach. I do it. This way I have the nice side effect that anything a sysadmin did directly and manually on the server bypassing the config database (something that shouldn't really be done) gets wiped out as soon as possible.
> in bash
Almost every Unix out there has Python, Perl and Ruby already installed. You don't need to use bash unless you really want it.