Advertisement
Guest User

Untitled

a guest
Jan 4th, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.31 KB | None | 0 0
  1. . /usr/share/libubox/jshn.sh
  2.  
  3. handle_iface() {
  4.   local val=$1  # unusable for non-scalar values
  5.   local key=$2
  6.   local protocol
  7.  
  8.   json_select "$key"
  9.   json_get_vars protocol
  10.   json_select ..
  11.  
  12.   echo "Proto of $key is $protocol"
  13. }
  14.  
  15. json_load "$(cat /etc/board.json)"
  16. json_for_each_item handle_iface network
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement