This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
function printUsage() { | |
echo -e USAGE="\nUsage: $0 ip_address delay_in_ms percentage_of_packet_loss \nor\nUsage: $0 reset\n" | |
} | |
if [ "$#" == "0" ] || [ "$#" == "1" ] && [ "$1" != "reset" ] || [ "$1" != "reset" ] && [ "$#" -ne 3 ]; then | |
printUsage |