<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Priv Set Advanced in a shell script in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123464#M26446</link>
    <description>&lt;P&gt;I did several times and it several different ways..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've discovered after hours of frustration, trial and error that the output for an ssh session is just not the same is the output of logging in and running the commands manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've managed to hack it but it would be VERY handy if netapp were able to make this output standard across both methods.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your response though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2016 21:18:49 GMT</pubDate>
    <dc:creator>os2mac</dc:creator>
    <dc:date>2016-09-21T21:18:49Z</dc:date>
    <item>
      <title>Priv Set Advanced in a shell script</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123429#M26435</link>
      <description>&lt;P&gt;I'm trying to run a manual quota report with specific parameters from a Unix box against a cDot 8.2 svm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically I want to go to advanced mode:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set -privilege advanced -confirmations off -units KB -rows 99 -showseparator "\,"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then run&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;quota report -vserver &lt;EM&gt;&lt;STRONG&gt;svmservername&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;-fields quota-type,quota-target-id,volume,tree,disk-used,disk-limit,threshold,quota-specifier&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it works when I do it manually but not when I run the following script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#!/usr/bin/bash&lt;BR /&gt;#Command Variables&lt;BR /&gt;USER=&lt;STRONG&gt;&lt;EM&gt;"username"&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;SET='set -privilege advanced -confirmations off -units KB -rows 99 -showseparator "\,"'&lt;BR /&gt;REPORT=`quota report -vserver &lt;STRONG&gt;&lt;EM&gt;svmservername&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;-fields quota-type,quota-target-id,volume,tree,disk-used,disk-limit,threshold,quota-specifier`&lt;BR /&gt;OUT=quota.txt&lt;/P&gt;&lt;P&gt;SVMSVR=192.168.1.1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;case $1 in&lt;BR /&gt;'SVMSVR')&lt;BR /&gt;ssh $USER@$SVMSVR "$SET; $REPORT" &amp;gt;quota.txt&lt;BR /&gt;;;&lt;BR /&gt;*)&lt;BR /&gt;esac&lt;BR /&gt;exit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please don't suggest I do this in a powershell script. this must be run from a unix box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 18:59:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123429#M26435</guid>
      <dc:creator>os2mac</dc:creator>
      <dc:date>2025-06-04T18:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Priv Set Advanced in a shell script</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123431#M26436</link>
      <description>&lt;P&gt;try it without the back ticks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 01:10:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123431#M26436</guid>
      <dc:creator>SeanHatfield</dc:creator>
      <dc:date>2016-09-21T01:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Priv Set Advanced in a shell script</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123464#M26446</link>
      <description>&lt;P&gt;I did several times and it several different ways..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've discovered after hours of frustration, trial and error that the output for an ssh session is just not the same is the output of logging in and running the commands manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've managed to hack it but it would be VERY handy if netapp were able to make this output standard across both methods.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your response though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 21:18:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123464#M26446</guid>
      <dc:creator>os2mac</dc:creator>
      <dc:date>2016-09-21T21:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Priv Set Advanced in a shell script</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123465#M26447</link>
      <description>&lt;P&gt;Glad you got it working. &amp;nbsp;The output should be the same. &amp;nbsp;Perhaps you're still running your local quota command?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I was trying to nudge you towards was that using back ticks on the quota command is executing it against your local machine and storing the result in the variable. &amp;nbsp;Then later you were trying to send the result of the local quota command to the cluster over ssh. &amp;nbsp;You probably also discovered you need quotes around the IP, and the case structure doesn't look right. &amp;nbsp;you probably want a for/in/do structure there instead if you plan to have a list of targets to run it against at some point down the road.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 21:49:10 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123465#M26447</guid>
      <dc:creator>SeanHatfield</dc:creator>
      <dc:date>2016-09-21T21:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Priv Set Advanced in a shell script</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123469#M26448</link>
      <description>&lt;P&gt;os2mac -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm with Sean - there shouldn't be any difference between running a command via SSH or via a direct login to the CLI. &amp;nbsp;I use SSH (well, Plink from Windows) for tons of scripted stuff where a command line is just convenient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another suggestion for improvement - use "rows 0" rather than "rows 99". &amp;nbsp;Setting rows to 99 can still paginate if enough data, while rows 0 will not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And since you mention this has to come from a UNIX box - just have to ask - how's your perl? &amp;nbsp;If you have decent perl skills, there are additional&amp;nbsp;options to get just the data you need and format as desired using the NMSDK alongside perl in functionally small scripts and you don't need to worry about setting options and such to get the data. &amp;nbsp;Just a thought for your consideration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bob Greenwald&lt;/P&gt;&lt;P&gt;Senior System Engineer | &lt;A title="cStor | We Look Beyond IT" href="http://www.cstor.com" target="_blank"&gt;cStor&lt;/A&gt;&lt;/P&gt;&lt;P&gt;NCIE SAN ONTAP, Data Protection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="cStor | We Look Beyond IT" href="http://www.cstor.com" target="_blank"&gt;&lt;IMG src="https://community.netapp.com/t5/image/serverpage/image-id/6058i86732B63D192FD75/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="cStorFullLogo_web.png" title="cStorFullLogo_web.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Kudos and accepted solutions are always appreciated.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 01:42:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Priv-Set-Advanced-in-a-shell-script/m-p/123469#M26448</guid>
      <dc:creator>bobshouseofcards</dc:creator>
      <dc:date>2016-09-22T01:42:05Z</dc:date>
    </item>
  </channel>
</rss>

