I am currently studying Network Namespace and found the following command in the reference book to delete Namespace in bulk.
forns in$ (ip netns list | awk'{print$1}'); do sudo ip netns delete $ns; done
Why does the above command interrupt the process of outputting the first column of Namespace output in awk as $(ip netns list | awk'{print$1}')?
As I checked with you, I was able to delete Namespace in bulk without interrupting the process of outputting awk as shown in the command below, so I would appreciate it if you could tell me why you are interposing awk commands like this.
forns in$(ip netns list); do sudo ip netns delete$ns; done
ip netns list
may display nsid as well as nsname
%ip netns list
nsname1 (id:1)
© 2024 OneMinuteCode. All rights reserved.