From d1f217b68fc8ef7c73c4f3c3ad6877e3a3b02da8 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Mon, 2 May 2016 13:02:22 +0100 Subject: [PATCH 1/2] cut: use a different separator characters --- pages/common/cut.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/common/cut.md b/pages/common/cut.md index e42a8b597..2795f9344 100644 --- a/pages/common/cut.md +++ b/pages/common/cut.md @@ -14,14 +14,14 @@ `cut -c{{3-}}` -- Cut out the fifth field, split on the colon character of each line: +- Cut out the fifth field, split on the colon characters of each line: `cut -d'{{:}}' -f{{5}}` -- Cut out the fields five and 10, split on the colon character of each line: +- Cut out the fields five and 10, split on the semicolon characters of each line: -`cut -d'{{:}}' -f{{5,10}}` +`cut -d'{{;}}' -f{{5,10}}` -- Cut out the fields five through 10, split on the colon character of each line: +- Cut out the fields five through 10, split on the space characters of each line: -`cut -d'{{:}}' -f{{5-10}}` +`cut -d'{{ }}' -f{{5-10}}` From 2094ff365f2724deec8ace337b7b6c24dae80c55 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Sat, 7 May 2016 18:28:06 +0100 Subject: [PATCH 2/2] use the term "delimiter" for the -d option --- pages/common/cut.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/common/cut.md b/pages/common/cut.md index 2795f9344..377b8f80c 100644 --- a/pages/common/cut.md +++ b/pages/common/cut.md @@ -14,14 +14,14 @@ `cut -c{{3-}}` -- Cut out the fifth field, split on the colon characters of each line: +- Cut out the fifth field of each line, using a colon as a field delimiter (default delimiter is tab): `cut -d'{{:}}' -f{{5}}` -- Cut out the fields five and 10, split on the semicolon characters of each line: +- Cut out the 2nd and 10th fields of each line, using a semicolon as a delimiter: -`cut -d'{{;}}' -f{{5,10}}` +`cut -d'{{;}}' -f{{2,10}}` -- Cut out the fields five through 10, split on the space characters of each line: +- Cut out the fields 3 through 7 of each line, using a space as a delimiter: -`cut -d'{{ }}' -f{{5-10}}` +`cut -d'{{ }}' -f{{3-7}}`