Skip to content

Commit

Permalink
Simpler solution
Browse files Browse the repository at this point in the history
  • Loading branch information
l0b0 committed Jun 11, 2012
1 parent 07a1ed1 commit 804de41
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions split-lines.sh
Expand Up @@ -31,15 +31,4 @@
# #
################################################################################ ################################################################################


awk ' sed -e '{ s/\(.\{75\}\)\([^\r]\)/\1\r\n \2/; P; D }' "$@"
{
if (length() > 76) {
printf("%s\r\n ", substr($0, 1, 75));
$0 = substr($0, 76);
while (length() > 75) {
printf("%s\r\n ", substr($0, 1, 74));
$0 = substr($0, 75);
}
}
print $0;
}' "$@"

0 comments on commit 804de41

Please sign in to comment.