Question should be what value you get at what step. Maybe you add an echo $remaining at the points where you issue that symclone to see what it is actually doing.
Also I guess you could leave out the initial if -condition, as the while -loop already checks the status and -ge 1 must be true - else it would not reach the while -loop. So just the while -loop should be sufficient in terms of control.
I get an integer value assigned to "remaining" variable as an output of the command.
---------- Post updated at 10:37 AM ---------- Previous update was at 10:22 AM ----------
Zaxxon,
I will try to implement the changes that you suggested.
The output right now is as follows:-
The recreate was successfully completed for device file GSI_REPORTING_PAIRS.
1921291 MB's to be copied.........
'Activate' operation execution is in progress for the device list in
device file '/usr/local/scripts/emc/backup/etc/GSI_REPORTING_PAIRS'. Please wait...
Right now it goes in to the
while [ $remaining -ge 1 ]
loop and just comes out of it . The activate operation should actually be done after
$remaining
reaches less than 1
I also get an error saying argument missing, not sure if it makes sense
Based on the data sample, isn't the number the first field? On my test the first value of $remainder is the string MB's which might explain your syntax error.