简体   繁体   中英

How to read a nginx style config file using shell script

I am writing a shell script only application. I would like to read file a nginx style config file (like the one below):

some_block {
    variable1 value1;
    variable2 value2;

    config_array1 value3 {
        sub_variable1 value1;
        sub_variable2 value2;
    }
}

Basically I am trying to make a backup system that would read a similar config file as above. I searched a lot, but didn't find any help on reading any complex config file as above. Any help appreciated.

在仔细阅读了所有评论和一些讨论之后,我知道仅使用Shell是不可能的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM