Q:

Automating creation of a settings.php file in a version-agnostic way

To create a latest Drupal project with a local Drush I might do for example:
drt=/var/www/html
composer create-project drupal-composer/drupal-project "$drt"

To create a Drupal settings.php for such new Drupal project I assume I should do:
cp "$drt"/domain.tld/sites/default/default.settings.php \
"$drt"/domain.tld/sites/default/settings.php

Yet, I desire to make a version agnostic copy of the settings.php file that will be ready for other operations like sed or awk.
Is there some Drush/Drupal-console (or maybe even some Drupal-specified Composer option or argument - not sure about that) that will let me automize this operation in a version agnostic-way so that if "tomorrow" default.settings.php will have a different name or at least be located in another directory than ./sites/default/ I would still have a settings.php-like file without the need of a manual cp operation?

A:

I wouldn’t have thought so. Copying a file is such a trivial act that I doubt anyone would’ve thought to wrap it up in a specific piece of functionality.
The only time the file would move would be as part of a major breaking update (e.g. moving from 8.x to 9.x), at which point you’ll want to be checking what’s changes anyway, and adjusting any scripts to conform to any new requirements. 
Maybe a command would be written into Drush/console in the future if there were any plans to move or rename settings.php - currently there aren’t any such plans so it probably doesn’t make sense for one to exist.

