Comments (3)
I don't think you got that one from my dotfiles. However, this is easily fixed sans perl.
ifconfig -a | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+'
If you also want the interface name, you could use something like the following, just be sure to change the range to match the number of interfaces you have (I have two):
for i in {0..1}; do echo "en$i → $(ipconfig getifaddr en$i)"; done
from dotfiles.
Whoops, sorry! I posted in the wrong repo... Thank you very much for helping out anyways!
Btw, ended up using the following:
ifconfig -a | grep -o 'inet [0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+' | sed s/inet\ //g
from dotfiles.
Woo, excellent!
from dotfiles.
Related Issues (16)
- Preserve line and column position in vim actions HOT 2
- Add support for RVM: Ruby Version Manager
- Screenshot URL is broken
- color issues in GNU/Unix Screen
- Persistent Undo HOT 2
- test HOT 3
- Errors in prompt after su on CentOS HOT 4
- Color issues in output during install HOT 1
- Create own repo for molotov colorscheme HOT 1
- Question: Why use `noh` over `let @\ = ""` to clear last search? HOT 2
- vim: remap ' to ` HOT 1
- Consistent loading of files HOT 1
- Using a custom .keylayout will make ~/.snippets/_-gf3.snippets redundant HOT 1
- alias bitch,=sudo
- Backups broken in Ruby 1.9.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotfiles.