Fix sorting, rename tmp file
This commit is contained in:
parent
c8a0fb46cc
commit
6cad5c85c0
7
scsictl
7
scsictl
@ -35,10 +35,11 @@ case "${1}" in
|
|||||||
else
|
else
|
||||||
DEVICE_SZ="${DEV_BYTES}B"
|
DEVICE_SZ="${DEV_BYTES}B"
|
||||||
fi
|
fi
|
||||||
echo "${DEV_HCIL} ${DEV_PORT} ${BLOCKDEV} ${DEVICE_SZ} ${DEVICE_ID}" | sort -n >> /tmp/bdmap
|
echo "${DEV_HCIL} ${DEV_PORT} ${BLOCKDEV} ${DEVICE_SZ} ${DEVICE_ID}" >> /tmp/scsictl
|
||||||
done
|
done
|
||||||
column -N H:C:I:L,PORT,DEV,SIZE,NAME -t -R2,4 -o" " /tmp/bdmap
|
sort -n -o /tmp/scsictl /tmp/scsictl
|
||||||
rm /tmp/bdmap
|
column -N H:C:I:L,PORT,DEV,SIZE,NAME -t -R2,4 -o" " /tmp/scsictl
|
||||||
|
rm /tmp/scsictl
|
||||||
;;
|
;;
|
||||||
*) echo "Unknown verb '${1}' -- expected delete, list, or rescan"; exit 1;;
|
*) echo "Unknown verb '${1}' -- expected delete, list, or rescan"; exit 1;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user