#19578: uci show / regression / output contains single quotes
------------------------+------------------------
  Reporter:  bittorf@…  |      Owner:  developers
      Type:  defect     |     Status:  closed
  Priority:  normal     |  Milestone:
 Component:  packages   |    Version:  Trunk
Resolution:  not_a_bug  |   Keywords:
------------------------+------------------------

Comment (by bittorf@…):

 maybe it was not *meant* to be parsed, but the users do that.
 if so, a warning message should be displayed:

 examples, where users do 'uci show | grep xy'
 http://luci.subsignal.org/trac/browser/luci/trunk/contrib/package
 /freifunk-
 policyrouting/files/etc/hotplug.d/iface/30-policyrouting?rev=6967
 http://stackoverflow.com/questions/28433770/extract-string-from-another-
 using-grep
 https://freifunk-muenster.de/wiki/doku.php?id=nodes:ucibasics
 https://forum.freifunk.net/t/tl-wdr4300-lan-ports-als-switch-nutzen/3525
 [...]

 beside that:
 your examples above with "network.@switch_vlan[]" is invalid: i dont know
 the interface-index 0 - thats the reason for grep'ing.

 also:
 i have a dynamic added list of 25 alias-ip's in my network-config:
 how can i check, if $IP is already added?

 {{{
 uci show network.@alias[] | fgrep ipaddr=10.10.43.33 || add_alias
 }}}

 how should one write this with '/lib/functions.sh' and 'config_get'?

--
Ticket URL: <https://dev.openwrt.org/ticket/19578#comment:2>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to