aboutsummaryrefslogblamecommitdiffstats
path: root/doc/rat-cursors/to-text
blob: 9bdcd7d929b107c57a78972647197d37f60b3265 (plain) (tree)
1
2
3
4
5
6
7
8
         
 
                                                                                  




                                                                         


                                               
 
              
#!/bin/sh

data="$(sed 's/\(.\) /\1\1/g' | sed 's/\./ /g' | sed 's/O/#/g' | sed 's/ \+$//g')"

while [ $(echo "${data}" | grep -v '^ ' | grep -v '^$' | wc -l) = 0 ]; do
    data="$(echo "${data}" | sed 's/^ //')"
done

while [ "$(echo "${data}" | sed 1q)" = "" ]; do
    data="$(echo "${data}" | sed 1d)"
done

echo "${data}"