diff --git a/storage-test.sh b/storage-test.sh index 310df6a..aacb76e 100755 --- a/storage-test.sh +++ b/storage-test.sh @@ -106,11 +106,10 @@ ChosenPartition="" if [ "$1" = "" ]; then # User did not provide a partition/folder, change directory to rootfs df=0 - drives=($(df | grep ext4)) - for d in $(df | grep ext4); do + while IFS= read -r line; do ((df++)) - echo "${df}) ${d}" - done + echo "${df}) ${line}" + done <<< "$(df | grep ext4)" exit 0 cd /