Even better: Don’t use bash. I started using Python instead of bash. It’s way better to read and more maintainable. If I need the performance of native-Unix commands, I can still use them using subprocess.
from sh import ifconfig print(ifconfig("wlan0"))