Changed ipaddr to basic bash script
This commit is contained in:
parent
6ac59a171b
commit
7cb787e82b
2 changed files with 8 additions and 1 deletions
2
aliases
2
aliases
|
|
@ -244,7 +244,7 @@ alias inxi-i="doas inxi -Fxzm"
|
|||
alias forecast="curl -s 'http://wttr.in/losangeles'"
|
||||
alias pf="pfetch"
|
||||
alias has="dependencycheck"
|
||||
alias ipaddr="curl ifconfig.me/all.json | jq"
|
||||
# alias ipaddr="curl ifconfig.me/all.json | jq"
|
||||
alias hwclock="doas hwclock"
|
||||
alias kill9="killall -9" # kills process by name, e.g. kill9 cmus
|
||||
alias ports="netstat -tunlp"
|
||||
|
|
|
|||
7
scripts/ipaddr
Executable file
7
scripts/ipaddr
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
IPV4=$(curl -s -4 icanhazip.com)
|
||||
IPV6=$(curl -s -6 icanhazip.com)
|
||||
|
||||
echo "Your IPV4 address is: ${IPV4}"
|
||||
echo "Your IPV6 address is: ${IPV6}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue