What I trying to do is getting 2 string before and after of each characters.

Input file: 

```
hello

reader

.....

```

The expected output is:

```
# # h e l //before character h is null and assign with '#". After character h are "e" and "l".
# h e l l //before character e is "h". After character e are "l" and "l".
h e l l o //before character l are "h" and "e". After character l are "l" and "o".
e l l o # //before character l are "e" and "l". After character l is "o".
l l o # # //before character o are "l" and "l". After character o is null and assign with '#".

# # r e a
# r e a d
r e a d e
e a d e r
a d e r #
d e r # #

```

Here is code: credit to RudiC

```
awk '
        { L = length * 2
          M = int (L / 4)
          X = sprintf ("%*sY%*s", M, "", M, "")
          gsub (/ /, "#", X)
          sub (/Y/, $1, X)
          gsub (/./, "& ", X)
          for (i=1; i<=L; i+=2) print substr (X, i, L-1)
        }
' $1 

```

but the first word only working

```
# # h e l
# h e l l
h e l l o
e l l o #
l l o # #
# # # r e a
# # r e a d
# r e a d e
r e a d e r
e a d e r #
a d e r # #

```