From f78536333a52d0308463a4de1c73541e215190d8 Mon Sep 17 00:00:00 2001 From: Bruno Heridet Date: Thu, 14 May 2020 02:36:08 +0200 Subject: [PATCH] doc: add rename command page (#1781) --- docs/commands/rename.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/commands/rename.md diff --git a/docs/commands/rename.md b/docs/commands/rename.md new file mode 100644 index 0000000000..d36df2fcaf --- /dev/null +++ b/docs/commands/rename.md @@ -0,0 +1,17 @@ +# 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 │ 0 │ 0 │ root │ /root │ /bin/bash + 1 │ bin │ x │ 1 │ 1 │ bin │ /bin │ /usr/bin/nologin + 2 │ daemon │ x │ 2 │ 2 │ daemon │ / │ /usr/bin/nologin + 3 │ mail │ x │ 8 │ 12 │ mail │ /var/spool/mail │ /usr/bin/nologin +────┴────────┴──────────┴──────┴──────┴────────┴─────────────────┴────────────────── +```