ONTAP Discussions

Is it possible to use loops or define variables in ngsh?

AllenChang
300 Views

I've recently been researching whether I can use automation methods in ONTAP. I found that ONTAP can use NGSH. But I failed to define variables or create loops. Can it use these functions like FreeBSD? Or can I use shell scripts to do what I want?

1 REPLY 1

Sanaman
185 Views

I never worked on NGSH, just bash from jump/management host (using password less /ssh keys) to login to clusters and run commands, something similar to

 

#!/bin/sh
cat asm_luns | awk ' \
{
cluster="clus1"
vserver="svm1"
cmd_ln1=" lun create -vserver svm1 -path "$1" -ostype windows_2008 -size "$2
system("/usr/bin/ssh admin@"cluster cmd_ln1)
next
}

 

That's my automation.
'

 

 

Public