Bash aliases

From PlebNet Wiki
Revision as of 23:03, 26 July 2021 by User (talk | contribs) (Created page with "Bash aliases are used to create shorter versions of more complex commands that would otherwise be too long and tedious to type in. In this case, we see aliases for commands th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Bash aliases are used to create shorter versions of more complex commands that would otherwise be too long and tedious to type in. In this case, we see aliases for commands that are focussed on operating a lightning node.

Rather than simply adding all these aliases to your .bash_aliases, consider reading through them carefully, and testing them out first to understand what they do.

WORK IN PROGRESS

# linux default bitcoin regtest path
alias brdir="cd ~/.bitcoin/regtest"

alias bc='bitcoin-cli'
alias bt='bitcoin-cli -testnet'
alias br='bitcoin-cli -regtest'
alias gbinfo='bitcoin-cli getblockchaininfo'

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; .) ; .)'\'''