I just pondered upon this problem while executing some tasks in shell.
How can I convert a
Note: The line without any letter contains a space and EOL
cat file1.txt |tr '\n' ' ' >file2.txt
H e l l o W o r l d
After going through all the suggestions and little bit of research, I found a solution for this, wrote a script for the same:
#!/bin/bash #Converting text to horizontal direction IFS='' while read line do echo -n $line done < $1 > $2 # $1 --> file1.txt contain vertical text as mentioned in the question echo "$(cat $2)"
$./convert.sh file1.txt file2.txt