Home Explore Blog CI



nushell

commands/docs/format.md
c5df009f433145b6b438cd5aad6c9b973b36b058fc1deb1f000000030000070f
---
title: format
categories: |
  strings
version: 0.104.0
strings: |
  Various commands for formatting data.
usage: |
  Various commands for formatting data.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `format` for [strings](/commands/categories/strings.md)

<div class='command-title'>Various commands for formatting data.</div>

## Signature

```> format {flags} ```


## Input/output types:

| input   | output |
| ------- | ------ |
| nothing | string |
## Notes
You must use one of the following subcommands. Using this command as-is will only produce this help message.

## Subcommands:

| name                                                   | description                                                      | type     |
| ------------------------------------------------------ | ---------------------------------------------------------------- | -------- |
| [`format bits`](/commands/docs/format_bits.md)         | Convert value to a string of binary data represented by 0 and 1. | built-in |
| [`format date`](/commands/docs/format_date.md)         | Format a given date using a format string.                       | built-in |
| [`format duration`](/commands/docs/format_duration.md) | Outputs duration with a specified unit of time.                  | built-in |
| [`format filesize`](/commands/docs/format_filesize.md) | Converts a column of filesizes to some specified format.         | built-in |
| [`format number`](/commands/docs/format_number.md)     | Format a number.                                                 | built-in |
| [`format pattern`](/commands/docs/format_pattern.md)   | Format columns into a string using a simple pattern.             | built-in |

Chunks
b61ed6ef (1st chunk of `commands/docs/format.md`)
Title: Formatting Commands in Nushell
Summary
The `format` command in Nushell provides various subcommands for formatting data, including bits, dates, durations, file sizes, numbers, and custom patterns. It operates on strings and requires one of the subcommands to be specified for actual formatting to occur.