hello I have a command
echo $(ssh [email protected] 'zfs list -o name -t snapshot | grep tank/dema@Daily_$(date +"%Y-%m-%d") | wc -l')
this returns a integer value I need to while loop over it but can't seem to figure out who to do that.
while echo $(ssh [email protected] 'zfs list -o name -t snapshot | grep tank/dema@Daily_$(date +"%Y-%m-%d") | wc -l') -g 1; do
echo stuff
done
echo $(ssh [email protected] 'zfs list -o name -t snapshot | grep tank/dema@Daily_$(date +"%Y-%m-%d") | wc -l') -g 1andecho $(ssh [email protected] 'zfs list -o name -t snapshot | grep tank/dema@Daily_$(date +"%Y-%m-%d") | wc -l')whilekeeps looping as long as that condition is true (returns a 0 exit status). So what exactly do you observe when executing your code above? That the code inside of the while loop is never executed?