#!/bin/bash # Wrapper to execute any command in a specific # network namespace. # Usage: # sonic-netns-exec NS="$1" shift if [ ! -z "$NS" ]; then ip netns exec $NS "$@" else "$@" fi