summaryrefslogtreecommitdiffstats
path: root/bin/sentences
diff options
context:
space:
mode:
authorYigit Sever2020-09-16 15:22:27 +0300
committerYigit Sever2020-09-16 15:22:27 +0300
commit7419b9fc45ba291d5d10a9f5bea3fa5d33dfedc0 (patch)
treedbc1e308cfbb398f77c784b7ea52c08e5aeb8332 /bin/sentences
parent44ff427c77e4c3848d273b0bc3484435ec9528c7 (diff)
downloaddotfiles-7419b9fc45ba291d5d10a9f5bea3fa5d33dfedc0.tar.gz
dotfiles-7419b9fc45ba291d5d10a9f5bea3fa5d33dfedc0.tar.bz2
dotfiles-7419b9fc45ba291d5d10a9f5bea3fa5d33dfedc0.zip
move bin to .local/bin
Diffstat (limited to 'bin/sentences')
-rwxr-xr-xbin/sentences16
1 files changed, 0 insertions, 16 deletions
diff --git a/bin/sentences b/bin/sentences
deleted file mode 100755
index a02d061..0000000
--- a/bin/sentences
+++ /dev/null
@@ -1,16 +0,0 @@
1#!/usr/bin/perl
2
3use strict;
4my $pont=qr{[.!?]+}; ## pontuation
5my $abrev=qr{\b(?:Pr|Dr|Mr|[A-Z])\.}; ## abreviations
6
7$/="";
8
9while(<>){ chomp; ## for each paragraph,
10
11 s/\h*\n\h*/ /g; ## remove \n
12 s/($pont)\h+(\S)/$1\n$2/g; ## pontuation+space
13 s/($abrev)\n/$1 /g; ## undo \n after abreviations
14
15 print "$_\n\n";
16}