-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
109dae0
commit 7ab67eb
Showing
3 changed files
with
160 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sed -Ef | ||
# | ||
# Add decimal separator to long digit sequences | ||
# | ||
# Diomidis Spinellis, October 2018 | ||
# | ||
|
||
:a | ||
# Add a , after a digit followed by three digits followed by non-digit or EOL | ||
s/([0-9])([0-9]{3})([^0-9]|$)/\1,\2\3/ | ||
|
||
# Try the replacement again if the replacement succeeded | ||
ta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.