본문으로 건너뛰기
0%
1분 미만 (51 단어) ko

Bash Get Ip address?

Categories TechSavvy Bash
Tags #TechSavvy #ProgrammingLanguage #Bash

Get Ip Address

만약 ethernet interface가 eth0 인 경우

$ IPADDR=$(ifconfig eth0|grep inet|head -1|sed 's/\:/ /'|awk '{print $2}')
$ echo $IPADDR
172.17.0.3

Appendix. References

Share this article

Found this helpful? Share it with your network

Join the Discussion

Share your thoughts and connect with other readers

댓글

GitHub 계정으로 로그인하여 댓글을 남겨보세요. 건설적인 의견과 질문을 환영합니다!

댓글을 불러오는 중...