[Bug 409370] New: Adjustment of list results for easier postprocessing
https://bugzilla.novell.com/show_bug.cgi?id=409370 Summary: Adjustment of list results for easier postprocessing Product: openSUSE 11.0 Version: Final Platform: x86-64 OS/Version: openSUSE 11.0 Status: NEW Severity: Enhancement Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: Markus.Elfring@web.de QAContact: qa@suse.de Found By: --- A couple of software management subcommands return preformatted text tables. Example: Sonne:~ # zypper locks # | Name | Type | Repository ----+------------------------------+---------+----------- 1 | perl-SNMP | package | (any) 2 | libfmodex4 | package | (any) This default format is not easily useable for "foreach" loops in shell scripts. Would you like to provide additional command parameters for fine tuning of the list result? Use case: for XYZ in `zypper locks --name --list` ; do more_work $XYZ ; done I imagine that it will already help for some scripting languages if the horizontal delimiter for the table header could be omitted. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=409370 User jkupec@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=409370#c1 Ján Kupec <jkupec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|zypp-maintainers@forge.provo.novell.com |jkupec@novell.com Status|NEW |ASSIGNED Target Milestone|--- |Future/Later for Fix| | --- Comment #1 from Ján Kupec <jkupec@novell.com> 2008-07-16 02:54:09 MDT --- Yes, this is planned, but has low priority. '--terse' global option will be probably used. Controlling the displayed columns with options is also an interesting idea. There could be a generic modifier for any table output (e.g. --table 'Name,Type' to display only those two columns). Also note the --xmlout (although not entirely straightforward for use in scripts, and it still does not print tables in xml). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=409370 User Markus.Elfring@web.de added comment https://bugzilla.novell.com/show_bug.cgi?id=409370#c2 --- Comment #2 from Markus Elfring <Markus.Elfring@web.de> 2008-07-16 14:26:11 MDT --- (In reply to comment #1 from Jan Kupec)
Controlling the displayed columns with options is also an interesting idea.
I hope that this query interface will become smarter and more efficient than the following command. Example: Sonne:~ # date ; for XYZ in $(zypper locks | tail --lines +3 | cut --delimiter \| --fields 2) ; do echo unlock: $XYZ ; time zypper removelock $XYZ ; done Wed Jul 16 22:18:50 CEST 2008 unlock: perl-Set-Object Reading installed packages... Lock count has been succesfully decreased by: 1 real 0m40.951s user 0m10.324s sys 0m0.838s unlock: perl-Set-Scalar Reading installed packages... Lock count has been succesfully decreased by: 1 real 0m11.482s user 0m10.089s sys 0m0.640s unlock: perl-Socket6 Reading installed packages... Lock count has been succesfully decreased by: 1 real 0m11.314s user 0m9.945s sys 0m0.645s unlock: perl-Text-DelimMatch Reading installed packages... Lock count has been succesfully decreased by: 1 real 0m12.504s user 0m9.937s sys 0m0.733s unlock: perl-Time-Duration Reading installed packages... Lock count has been succesfully decreased by: 1 real 0m11.437s user 0m9.692s sys 0m0.690s unlock: perl-Time-Period Reading installed packages... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=409370 Ján Kupec <jkupec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com