Skip to content

Commit 57da2ed

Browse files
authored
Update getFilesystems.sh: Add missing ";"
Also, use "grep --count ..." to eliminate "wc -l"
1 parent fb082c8 commit 57da2ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/utilities/getFilesystems.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ FS="$( lsblk --output "NAME,SIZE,TYPE,HOTPLUG,MOUNTPOINTS" )"
4949

5050
HEADER="$( echo "${FS}" | head -1 )"
5151
ENTRIES="$( echo "${FS}" | grep -v "${HEADER}" )"
52-
NUM_DISKS="$( echo "${FS}" | grep -E " disk| disk $" | wc -l )"
52+
NUM_DISKS="$( echo "${FS}" | grep --count -E " disk| disk $" )"
5353

5454
# Ignore the boot drive and entries we know aren't the user's extra storage device.
5555
POSSIBLE="$( echo "${ENTRIES}" | nawk 'BEGIN { num = 0; }
@@ -89,7 +89,7 @@ if [[ -n ${POSSIBLE} ]]; then
8989
if [[ ${NUM} -eq 1 ]]; then
9090
echo " the one above whose 'PATH' column is '${POSSIBLE}',"
9191
echo "as long as the 'SIZE' roughly matches your device."
92-
if [[ ${POSSIBLE} =~ " " ]] then
92+
if [[ ${POSSIBLE} =~ " " ]]; then
9393
echo
9494
echo "If this is your device we suggest removing the space from the PATH name,"
9595
echo "which may require changing the disk's label."

0 commit comments

Comments
 (0)