Add source files

This commit is contained in:
raul 2024-11-20 09:29:51 +01:00
parent d63927544b
commit d41e2b1e67
Signed by: raul
GPG Key ID: C1AA797073F17129
3 changed files with 19 additions and 0 deletions

7
cooler_adduser.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
CMD=$(which useradd)
for USER in "$@"; do
$CMD -m $USER
echo "$USER:$USER" | chpasswd
done

10
recordbandwidth Executable file
View File

@ -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)))

2
replace_spaces Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done