diff options
Diffstat (limited to 'doc/rat-cursors')
-rwxr-xr-x | doc/rat-cursors/to-text | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/rat-cursors/to-text b/doc/rat-cursors/to-text index dc7007c..998159b 100755 --- a/doc/rat-cursors/to-text +++ b/doc/rat-cursors/to-text @@ -1,5 +1,10 @@ -#!/bin/sh -e +#!/bin/sh -sed 's/\(.\) /\1\1/g' | sed 's/\./ /g' | sed 's/@/X/g' | - sed 's/ \+$//g' +data="$(sed 's/\(.\) /\1\1/g' | sed 's/\./ /g' | sed 's/@/X/g' | sed 's/ \+$//g')" + +while [ $(echo "${data}" | grep -v '^ ' | grep -v '^$' | wc -l) = 0 ]; do + data="$(echo "${data}" | sed 's/^ //')" +done + +echo "${data}" |