Show all ip addresses without argument

master
Hektor Misplon 2021-01-09 14:28:36 +01:00
parent 9484168207
commit 57d94676c4
1 changed files with 1 additions and 2 deletions

View File

@ -1,3 +1,2 @@
#!/usr/bin/env bash #!/usr/bin/env bash
ip addr show $@ | awk '/inet / {gsub(/\/.*/,"",$2); print $2}'
ip addr show wlan0 | awk '/inet / {gsub(/\/.*/,"",$2); print $2}'