diff --git a/cooler_adduser.sh b/cooler_adduser.sh new file mode 100755 index 0000000..06d6390 --- /dev/null +++ b/cooler_adduser.sh @@ -0,0 +1,7 @@ +#!/bin/bash +CMD=$(which useradd) + +for USER in "$@"; do + $CMD -m $USER + echo "$USER:$USER" | chpasswd +done diff --git a/recordbandwidth b/recordbandwidth new file mode 100755 index 0000000..8b72bd1 --- /dev/null +++ b/recordbandwidth @@ -0,0 +1,10 @@ +#!/bin/sh +init="$(($(cat /sys/class/net/[ew]*/statistics/rx_bytes | paste -sd '+')))" + +printf "Recording bandwidth. Press enter to stop." + +read -r wait + +fin="$(($(cat /sys/class/net/[ew]*/statistics/rx_bytes | paste -sd '+')))" + +printf "%4sB of bandwidth used.\\n" $(numfmt --to=iec $(($fin-$init))) diff --git a/replace_spaces b/replace_spaces new file mode 100755 index 0000000..0a4e6e8 --- /dev/null +++ b/replace_spaces @@ -0,0 +1,2 @@ +#!/bin/bash +for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done