Questo contenuto non è disponibile nella lingua selezionata.

Chapter 6. Formatting Hammer output


You can modify the default formatting of the output of Hammer commands to simplify the processing of this output by other command line tools and applications.

Hammer provides several output formats:

  • table – generates output in the form of a human readable table (default).
  • base – generates output in the form of key-value pairs.
  • yaml – generates output in the YAML format.
  • csv – generates output in the Comma Separated Values format. Output in CSV format is useful for example when you need to parse IDs and use them in a for loop.

    To define a custom separator, use the --csv and --csv-separator options instead.

  • json – generates output in the JavaScript Object Notation format.
  • silent – suppresses the output.

Procedure

  • Set the output format with the --output option:

    $ hammer --output output_format organization list
    Copy to Clipboard Toggle word wrap
  • Define a custom separator for the CSV format:

    $ hammer --csv --csv-separator ";" organization list
    Copy to Clipboard Toggle word wrap
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2026 Red Hat
Torna in cima