-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
The line:
Line 44 in 068bd73
| veth=$(ip -o link | grep ^$ifindex | sed -n -e 's/.*\(veth[[:alnum:]]*@if[[:digit:]]*\).*/\1/p') |
finds the line starting with the correct $ifindex. But my veth interfaces are all connected to ifndex=2 (pretty normal), and I have, currently, up to ifindex=99.
So, the grep is matching not only index 2, but indices 20-28! I end up getting all the correct output, plus 8 lines showing interfaces described elsewhere but without container ID and name (I'm not sure why 28 isn't showing twice, but it is the next correct line):
> sudo bash Downloads/docker-veth.sh
veth3cbe7a1@if2 e186c3e0bfd2 c******-web
veth2373ae8@if2 6f382ab9fc46 q**********
veth4118ed3@if2 dd94d5e5cfe6 r*****r
veth2373ae8@if2 dd68aded8406 vpn
vetha7d7d59@if2 868d8283a2bb c*****e
veth02f663f@if2 2cf919a203a1 b****r
veth23b5eda@if2 038f7bb2bf65 p******r
veth9c64055@if2 3b2098fce507 j******n
veth16035eb@if2 087a8e74167f r****r
vethf044d12@if2 28a1cd1b4391 s****r
vethb85b7d1@if2 55e3d848ce4e open-*****
veth3288060@if2 19839291a283 homepage
vethcb2dcb1@if2 72d2a9bf8eb7 a******a
veth02f663f@if2
veth4118ed3@if2
veth9c64055@if2
veth16035eb@if2
vethf044d12@if2
vethb85b7d1@if2
veth3cbe7a1@if2
veth23b5eda@if2
vethb9898f7@if3 d6835495ff7f pihole
vethd7c4071@if2 5edece7f54b5 k*******p
veth98c088e@if2 fafe709a837d portainer
vethb76e431@if2 fce51687b48f traefik
vethe848f38@if2 ba8e5c3848e6 meili
veth85407d8@if2 3d030b1f302f chrome
host 39254d0007de dns-helper
veth19078cf@if2 1aa4eb370a66 cvmc-*****
vetha7591a4@if2 4ad8296797db p******s
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels