For the S4x19 competition, I needed a simple script to go through several hundred GB of pcaps and dump out a list of IP and MAC address pairings to prepare elements for the challenge. Here is a simple BASH script that can achieve that simply with tshark (sudo apt-get install tshark):
Here is a simple BASH script to bring down/up an interface randomly. Note there is no error checking or states... it will work if it can work. e.g if the interface is up, and the script calls up - it will be up.