I came from a bash background, and need your help to create a looping to create snapshots. Say I have a file which contains multple lines of the volume name and also a snapshot name. How do I create such loop and take these two variable, then in the body to run the snapshot creating script:
I'm assuming there is a reason you want to take a manual snapshot instead of using a snapshot policy? It's possbile to do but whenever possible let ontap handle snapshot creation.
Here is some code that will do what you want. You could simplify it as it contains error checking\comments\validatation. Also contains an inner do loop within the for loop to validate the line in the file contains the correct number of elements (vserver name, volume name, snapshot name)