nushell/docs/commands/rename.md
2020-05-24 02:02:44 -05:00

18 lines
1.4 KiB
Markdown

# rename
Use `rename` to give columns more appropriate names.
## Examples
```shell
> open /etc/passwd | lines | split column ":" | rename user password uid gid gecos home shell
────┬────────┬──────────┬──────┬──────┬────────┬─────────────────┬──────────────────
# │ user │ password │ uid │ gid │ gecos │ home │ shell
────┼────────┼──────────┼──────┼──────┼────────┼─────────────────┼──────────────────
0 │ root │ x │ 00 │ root │ /root │ /bin/bash
1 │ bin │ x │ 11 │ bin │ /bin │ /usr/bin/nologin
2 │ daemon │ x │ 22 │ daemon │ / │ /usr/bin/nologin
3 │ mail │ x │ 812 │ mail │ /var/spool/mail │ /usr/bin/nologin
────┴────────┴──────────┴──────┴──────┴────────┴─────────────────┴──────────────────
```