Re: interesting 9.3P17 & 9.5P5 bug

"John Stoffel" <[email protected]>
Newsgroups gmane.comp.hardware.netapp
Message-ID <[email protected]>
Thanks for checking, I think it's a bug myself... but I can see how it
might be considered a feature of some sort.
>>>>> "tmac" == tmac  <[email protected]> writes:

tmac> Just tried in 9.7P11

tmac> knoxsahrc09l99::> set -showseparator ","

tmac> knoxsahrc09l99::> export-policy show
tmac> Vserver          Policy Name
tmac> ---------------  -------------------
tmac> esxi_boot        default

tmac> knoxsahrc09l99::> set -showseparator "--"

tmac> knoxsahrc09l99::> export-policy show
tmac> Vserver          Policy Name
tmac> ---------------  -------------------
tmac> esxi_boot        default

tmac> knoxsahrc09l99::> export-policy show -fields vserver ,policyname
tmac> vserver--policyname--
tmac> Vserver--Policy Name--
tmac> esxi_boot--default--

tmac> knoxsahrc09l99::> set -showseparator " "

tmac> knoxsahrc09l99::> export-policy show -fields vserver ,policyname
tmac> vserver   policyname
tmac> --------- ----------
tmac> esxi_boot default

tmac> --tmac

tmac> Tim McCarthy, Principal Consultant

tmac> Proud Member of the #NetAppATeam

tmac> I Blog at TMACsRack

tmac> On Fri, Feb 12, 2021 at 11:58 AM John Stoffel <[email protected]> wrote:

tmac>     Just ran into an interesting bug in 9.3P17 (yes, I'm off support!)
tmac>     and another 9.5P5 system which I thought I'd share. 
   
tmac>     Let's grab all the export policies on the system in CSV format to make
tmac>     it easy to parse: 
   
tmac>         ntap1::> set -showseparator ","; export-policy show
   
tmac>         Vserver          Policy Name
tmac>         ---------------  -------------------
tmac>         foo              default
   
tmac>     WTF?  That's wierd?   Let's try something else:
   
tmac>         ntap1::> set -showseparator ","; export-policy show -fields vserver
tmac>         ,policyname
   
tmac>         vserver,policyname,
tmac>         Vserver,Policy Name,
tmac>         foo,default,
   
tmac>     Ah!  Now we're getting what we want.  Stupid annoying bug when you're
tmac>     trying to write a perl script to pull out data.  Can anyone confirm if
tmac>     this is still there in the latest releases?
   
tmac>     Hmm... poking at it some more... I suspect I'm forgetting that you
tmac>     *must* specify the fields when changing the -showseparator to get
tmac>     easier to parse output.  But I still think this is a surprising
tmac>     occurance, since it does include the field names, so there's no need
tmac>     to actually specify them in the output.
   
tmac>     Principal of least surprise and all that.
   
tmac>     Cheers,
tmac>     John
tmac>     _______________________________________________
tmac>     Toasters mailing list
tmac>     [email protected]
tmac>     https://www.teaparty.net/mailman/listinfo/toasters
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.