Difference between revisions of "Bash aliases"

From PlebNet Wiki
Jump to navigation Jump to search
(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...")
 
m
Line 18: Line 18:


</syntaxhighlight>
</syntaxhighlight>
[[File:Change bash_aliases.jpeg|500px]]

Revision as of 06:57, 27 July 2021

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

500px