22 lines
580 B
Bash
22 lines
580 B
Bash
#!/bin/bash
|
|
# updatestatus.sh
|
|
# Rescue CD Backup & Restore Utility status update script
|
|
# version 7.2.5
|
|
# Rod Wright 1/19/2024
|
|
# Refer to CHANGELOG file for details.
|
|
# -----------------------------------------------------------------------------
|
|
|
|
STATUS_FILE="/root/status.txt"
|
|
INFO_FILE="/root/rbinfo.txt"
|
|
UPDATE_INTERVAL=1
|
|
|
|
while true; do
|
|
csplit -s -f opsum $INFO_FILE '/^Image/'
|
|
cat /root/opsum00 | tr '\n' '\t'>$STATUS_FILE
|
|
rm /root/opsum*
|
|
echo "\n" >>$STATUS_FILE
|
|
#csplit -s -f opsum $INFO_FILE '%^Image%-1' '/Devices
|
|
|
|
sleep $UPDATE_INTERVAL
|
|
done
|