Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Configuration files are such a useful thing to start with - I remember one of my most productive changes was to hack on a local copy of mutt:

* If the configuration file had mode 0755 then execute it, and parse the output.

* Otherwise read as-is.

That was my solution to writing a complex configuration file, which behaved differently upon different hosts - write the thing in perl, and have it "print" blocks and configuration values appropriately.



Ok but why not just have separate, simpler configuration files for each host?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: