Translations:Bash aliases/7/en

From PlebNet Wiki
Revision as of 19:47, 2 October 2021 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

alias lnchannelcaps='lncli describegraph | jq '\.nodes[].total_channel_capacities=0 | foreach .nodes[] as ( . ; foreach .edges[] as ( . ; if .node1_pub==.pub_key then (|.total_channel_capacities=.total_channel_capacity+(.capacity|tonumber)) else empty end; .) ; .)'\' alias lnactive='lncli listchannels | jq '\[ .channels | .[] | select(.active=true) ] | length '\' alias lnchaninfo='lncli listchannels | jq '\[ .channels | .[] | { "remote_pubkey" : .remote_pubkey, "capacity": .capacity|tonumber, "local_balance": .local_balance|tonumber, "remote_balance": .remote_balance|tonumber } ]'\'