NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Discussions

How to make set adv, priv, diag with the rest of the command into one line of commnad.

sangyoon
8,693 Views

Hi All. I just wanted to find out if they can make the 'set [mode]' command with the rest of the command into one line of command. We are trying to monitor with the automated script so for them it would be a struggle if they have to separate those two lines when running the script. 

 

Would there be someway they can cheat or work around the way ? 

 

Best,

 

5 REPLIES 5

hmoubara
8,682 Views

Hello 

 

You should be able to use the ";" to separate multiple commands . As for the set command you can use the -c (confirmation) set to off.

 

Per example:

 

cluster::> set diag -c off; cluster ring show

 

Hope this answer your question.

 

Thanks 

parisi
8,640 Views

Correct. And don't worry about doing set admin/adv/diag. Just run them all from set diag.

akiendl
8,636 Views

I would strongly recommend to not run all as set diag. Diag mode has a number of things that are different on some commands and can cause you trouble. You should always go for least privilege needed. 

paul_stejskal
8,626 Views

I agree.

 

parisi
8,625 Views

When  using the CLI, sure. But when scripting them out, it doesn't really matter. You're not going to tab complete yourself into trouble. You'll run the same command you would in admin priv, just at diag level and it won't vary.

 

Diag commands are only different because you have extra flags you can run. They're not different simply because they're in diag priv.

Public