I am really struggling to find the solution to this problem. I would really appreciate It if you guys could put the script in nano.
Asked
Active
Viewed 1,192 times
1 Answers
1
If you meant to get the public IP address, you only need this command curl ipinfo.io/ip
But if you want to use a shell script, follow these steps:
- run this command in the terminal
nano script.sh put these lines in your script:
#!/bin/bash curl ipinfo.io/ippress Ctrl + x , then y to save the changes.
- run
chmod +x script.shto make your script executable
To run the script use:
./script.sh
singrium
- 7,320