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 john@stoffel.org 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 Toasters@teaparty.net https://www.teaparty.net/mailman/listinfo/toasters