Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to make set adv, priv, diag with the rest of the command into one line of commnad.
2021-11-23
06:44 PM
5,988 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Correct. And don't worry about doing set admin/adv/diag. Just run them all from set diag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
