Finding my public IP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Finding my public IP
# 1  
Old 11-23-2011
Finding my public IP

Hi

I do use this line to find my public IP.
Is there other way I can do this?
Maybe create the script some shorter?

wget -q -O - http://minip.no | grep "<b>" | head -n1 | cut -d'<' -f3 | cut -d'>' -f2

Thanks
# 2  
Old 11-23-2011
Code:
wget -q -O - http://minip.no | sed -n 's/.*Your IP is \([^ ]*\).*/\1/gp'

--ahamed
This User Gave Thanks to ahamed101 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Help with NFS public

Hi, Please help. I created a ZFS pool on Solaris 11.3 (thunder) and shared it using NFS (storage). But when I connect from my Mac without credentials I can't write to the share,I assume I have to make the share public but can't figure out the syntax,please help. Also the pool is for... (6 Replies)
Discussion started by: rthorntn
6 Replies

2. What is on Your Mind?

A public thank you...

AudioScope.sh has now had 2 votes of 5 stars. It has also been thanked in the latest upload... Although I know who thanked this kids project, and I have personally thanked that person, this is a public thank you to the two anonymous people who have voted it 5 stars. Thank you. It has... (0 Replies)
Discussion started by: wisecracker
0 Replies

3. Ubuntu

Rights in public folder

Hi, I have a Ubuntu Server which acts as a file server. I've installed Samba, as there are some Windows PCs in the network. I've created a public folder. Everyone has rw-rights in this folder. So far, so good. But everytime a user (which is logged in) saves a file in the public folder, that... (1 Reply)
Discussion started by: UYIM_Fabian
1 Replies

4. IP Networking

ping from public IP

I have 2 ethernet cards at my server,OEL5.5. One is for Public LAN and another is for private to install Oracle RAC. I am facing the following problem # ping 192.168.165.120 PING 192.168.165.120 (192.168.165.120) 56(84) bytes of data. 64 bytes from 192.168.165.120: icmp_seq=1 ttl=64... (3 Replies)
Discussion started by: faruque.ahmed
3 Replies

5. IP Networking

Public IP

I guys, I have a compute at home and I want access it from outside with a public IP, and the problem is that my ISP distributed private IP addresses and to access the Internet is through NAT and. I want to access that computer via SSH from other network, how can I do that? (1 Reply)
Discussion started by: pharaoh
1 Replies

6. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra (1 Reply)
Discussion started by: ravi3cha
1 Replies

7. Windows & DOS: Issues & Discussions

samba with public access

Hello friends .. I have configured "smb" in debian machine . Created a share named "share_one" with public access and started samba service . I am able to access the share "share_one" directly without any difficulty on linux machines. But when it comes to windows it asks for username... (1 Reply)
Discussion started by: pradeepreddy
1 Replies

8. UNIX for Advanced & Expert Users

SSH - Public key

When should one have to generate a public key on a Server when the public key is already created and used by other clients? Thanks, Rahul. (6 Replies)
Discussion started by: rahulrathod
6 Replies

9. Shell Programming and Scripting

finding duplicate files by size and finding pattern matching and its count

Hi, I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern. Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies
Login or Register to Ask a Question