blob: 5dae71bea258d833e953bf98212823e39a833ee7 (
plain)
1
2
3
4
5
6
7
8
|
#!/bin/sh
usage="Usage: $0 dir
Removes word-breaking hyphens from all .txt files in a directory."
test $# -ne 1 && echo "$usage" && exit 1
find "$1" -type f -name '*txt' -exec perl -0777pi -e 's/-\n(\S+)\s*/\1\n/smg' '{}' ';'
|