Is it possible to know the number of sections in a config file under /etc/.
For example for the file /etc/config/application, the command "uci show application.@section[1]" returns all the options under section 1.
In similar way, using UCI, is there any command which returns number of sections in config file.
Now to check whether the execution has reached end of file or not, is to run by incrementing the sections number until it reaches "uci: Entry not found"
If my guess that you're trying to iterate over config file is correct, I'd highly recommend you consider using the config_cb and the like callback options described here.