Skip to content

ErvisTusha/GetIP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌐 Get-IP - Network Interface IP Tool

Version License Bash

An easy-to-use bash script for retrieving and displaying IP addresses for network interfaces with support for both IPv4 and IPv6 addresses.

Get IP Logo

✨ Features

  • 🌐 Supports both IPv4 and IPv6 addresses
  • 🖥️ List all network interfaces
  • ⚙️ Display IP addresses for specific interfaces
  • 📋 Raw output mode for scripting
  • 🛠️ Easy installation and update options

Installation

# Direct installation
curl -sSL https://raw.githubusercontent.com/ErvisTusha/GetIP/main/getip.sh | sudo bash -s install

# Or clone and install
git clone https://github.com/ErvisTusha/GetIP.git
cd GetIP
./getip.sh install

Basic Usage

# Display IP addresses for all interfaces
getip.sh

# Display IP addresses for a specific interface
getip.sh eth0

# List all network interfaces
getip.sh --list

# Display only IPv4 addresses
getip.sh eth0 -4

# Display only IPv6 addresses
getip.sh eth0 -6

# Display raw IP addresses (no formatting)
getip.sh eth0 -4 --raw

🎯 Command Line Options

Options:
    -h, --help          | Show this help message
    -v, --version       | Show version information
    -l, --list          | List all network interfaces
    --raw               | Display IP addresses only (no formatting)
    -4                  | Show IPv4 addresses only (default)
    -6                  | Show IPv6 addresses only
    install             | Install script to /usr/local/bin
    update              | Update to latest version
    uninstall           | Remove script from system

🔧 Requirements

  • Bash shell
  • ip command (from iproute2 package)
  • awk command (preferably GNU Awk)

🏗️ Development

This script was developed using:

  • VSCode as the primary IDE
  • Claude 3.5 Sonnet for AI assistance
  • Modern bash scripting practices

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

Distributed under the MIT License. See LICENSE file for more information.

👤 Author

Ervis Tusha

🙏 Acknowledgments

  • VSCode team for the excellent IDE
  • The open-source community for inspiration

Made with ❤️ by Ervis Tusha

About

Get-IP is a straightforward bash script designed to retrieve and display IP addresses for network interfaces, supporting both IPv4 and IPv6 addresses. It provides easy-to-use options for listing all network interfaces, displaying IP addresses for specific interfaces, and outputting raw IP addresses for scripting purposes.

Resources

Stars

Watchers

Forks

Contributors

Languages