$ cat file1 abc $ fold -1 file1 | awk '{print $0}' a b c $ awk '{for(i=1;i<=length;i++) print substr($0, i, 1)}' file1 a b c