From 483a7f3168793fc8980727f417b1e8087eed4fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 20 May 2021 13:13:19 +0200 Subject: Rename 'ft' to 'f' It is such a commonly used utility that it might as well be as easy to type as possible. --- f | 8 ++++++++ f.1 | 27 +++++++++++++++++++++++++++ ft | 8 -------- ft.1 | 27 --------------------------- 4 files changed, 35 insertions(+), 35 deletions(-) create mode 100755 f create mode 100644 f.1 delete mode 100755 ft delete mode 100644 ft.1 diff --git a/f b/f new file mode 100755 index 0000000..157c307 --- /dev/null +++ b/f @@ -0,0 +1,8 @@ +#!/bin/sh + +# f -- fmt with new line for each sentence + +fmt "$@" | +sed 's/\([^ ]\)\. \([^ ]\)/\1.\n\.temporary line for fmt\n\2/g' | +fmt "$@" | +sed '/^\.temporary line for fmt$/d' diff --git a/f.1 b/f.1 new file mode 100644 index 0000000..104ebae --- /dev/null +++ b/f.1 @@ -0,0 +1,27 @@ +.Dd $Mdocdate$ +.Dt f 1 +.Os +. +.Sh NAME +.Nm f +.Nd fmt but with new sentence on new line +. +.Sh SYNOPSIS +.Nm f +.Op Ar arg ... +. +.Sh DESCIPTION +.Pp +.Nm +runs +.Xr fmt 1 +with any given +.Ar arg +in a way such that each new sentence begins on a new line. +Sentence breaks are recognized if the period in the original text +is followed by two spaces or a newline. +.Sh AUTHORS +.Pp +.Nm +is written by John Ankarström +.Aq Mt john (at) ankarstrom.se . diff --git a/ft b/ft deleted file mode 100755 index cc40806..0000000 --- a/ft +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# ft -- fmt with new line for each sentence - -fmt "$@" | -sed 's/\([^ ]\)\. \([^ ]\)/\1.\n\.temporary line for fmt\n\2/g' | -fmt "$@" | -sed '/^\.temporary line for fmt$/d' diff --git a/ft.1 b/ft.1 deleted file mode 100644 index 6ddfd86..0000000 --- a/ft.1 +++ /dev/null @@ -1,27 +0,0 @@ -.Dd $Mdocdate$ -.Dt ft 1 -.Os -. -.Sh NAME -.Nm ft -.Nd fmt but with new sentence on new line -. -.Sh SYNOPSIS -.Nm ft -.Op Ar arg ... -. -.Sh DESCIPTION -.Pp -.Nm -runs -.Xr fmt 1 -with any given -.Ar arg -in a way such that each new sentence begins on a new line. -Sentence breaks are recognized if the period in the original text -is followed by two spaces or a newline. -.Sh AUTHORS -.Pp -.Nm -is written by John Ankarström -.Aq Mt john (at) ankarstrom.se . -- cgit v1.2.3