bash: read File into Array
2019-01-13
Q: how to read a file into array with bash?
A: use mapfile
example
// file to read
sMimeTypeList="/etc/mime.types";
// create array `aMimeType`
mapfile aMimeType < <(cat "$sMimeTypeList" | grep -v "^$");
// test outputs
echo "${aMimeType[@]}"; # all
echo "100: ${aMimeType[100]}"; # just the 100. entry
[…]
Linux: SD Karte formatieren FAT32 für Android
2018-11-04
SD Karte FAT32 formatieren für Android
In Konsole
while true;do sudo dmesg -c;done
Dann SD Card in PC einlegen/connecten, Log beobachten und CD Karte identifizieren.
Beispiel:
[ 2568.861674] sd 8:0:0:0: [sde] 30318592 512-byte logical blocks: (15.5 GB/14.5 GiB)
[ 2568.882944] sde: sde1 sde2
[ 2569.280993] FAT-fs (sde1): Volume was not properly unmounted. Some data may be corrupt. Please run f […]