Re: interesting 9.3P17 & 9.5P5 bug

tmac <[email protected]>
Newsgroups gmane.comp.hardware.netapp
Message-ID <CAL9X-_HcW8=ne3VN-jCfD4XEt1PfPbBC0sg+psF1tTdNis8Oxg@mail.gmail.com>
Just tried in 9.7P11

knoxsahrc09l99::> set -showseparator ","

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

knoxsahrc09l99::> set -showseparator "--"

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

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

knoxsahrc09l99::> set -showseparator " "

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

--tmac

*Tim McCarthy, **Principal Consultant*

*Proud Member of the #NetAppATeam <https://twitter.com/NetAppATeam>*

*I Blog at TMACsRack <https://tmacsrack.wordpress.com/>*



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

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

_______________________________________________
Toasters mailing list
[email protected]
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.