Skip to content
Snippets Groups Projects
Commit 1dafcdf8 authored by Lennart Klebl's avatar Lennart Klebl
Browse files

Small bash script for some fun with the lipnsa-data

parent f8703e36
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# TODO Copy files automatically from inserted USB key.
Efifile=$(mktemp)
Memfile=$(mktemp)
Drivefile=$(mktemp)
for i in */; do
var=$(ls $i | head -1)
cat $i/$var/meminfo | grep MemTotal | awk '{print $2/1024/1024}' >> $Memfile
cat $i/$var/lsblk | grep disk | awk '{print $4}' | grep -v '^[0-9]\.[0-9]G' | grep -v "[0-9]*M" >> $Drivefile
cat $i/$var/efi >> $Efifile
done
echo -------- EFI ---------
echo $(cat $Efifile | grep yes | wc -l) ja, $(cat $Efifile | grep no | wc -l) nein.
echo -------- RAM ---------
cat $Memfile | sort -n | gnuplot -e "set terminal dumb; plot '<cat' with lines"
echo -------- HDD ---------
cat $Drivefile | sort -n | gnuplot -e "set terminal dumb; plot '<cat' with lines"
rm $Memfile $Drivefile $Efifile
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment