Programming Tips - bash: get my external IP-address in a bash script

Date: 2022jul19 Language: bash Q. bash: get my external IP-address in a bash script A. Visit website ifconfig.io with curl:
curl ifconfig.io
In a script:
#!/bin/bash MY_ADDRESS=$(curl --silent ifconfig.io) echo "You can reach me at $MY_ADDRESS"