diff options
author | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-03 15:21:41 +0200 |
---|---|---|
committer | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-03 15:21:41 +0200 |
commit | 3b88bd8a5e4d40f7f938d002ac10dc981ee43a80 (patch) | |
tree | 4e672303922c54116297c80f7d62489df8cc25b1 | |
parent | 8b710c8969cf38b432fe81931fcce5ea8c8ba05c (diff) | |
download | xutil-3b88bd8a5e4d40f7f938d002ac10dc981ee43a80.tar.gz |
f: Improve sed compatibility
-rwxr-xr-x | f | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3,6 +3,8 @@ # f -- fmt with new line for each sentence fmt "$@" | -sed 's/\([^ ]\)\. \([^ ]\)/\1.\n\.temporary line for fmt\n\2/g' | +sed 's/\([^ ]\)\. \([^ ]\)/\1.\ +\.temporary line for fmt\ +\2/g' | fmt "$@" | sed '/^\.temporary line for fmt$/d' |