-1

Consider the following string "google" . I want to split the following string as below using simple bash script. please help me out.

g
o
o
g
l
e
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
m1k
  • 37
  • 1
  • 6
  • 1
    You really put a lot of effort into your question didn't you? – Mitch Wheat Jul 28 '13 at 02:20
  • This my viva question. Please help me out Mitch if you can. – m1k Jul 28 '13 at 02:21
  • Perhaps you should help yourself by actually trying something... – Mitch Wheat Jul 28 '13 at 02:22
  • Its urgent Mitch :/ Please help me – m1k Jul 28 '13 at 02:24
  • So urgent that you can't attempt it? Are you banned from google? CLOSE, CLOSE, CLOSE! – Mitch Wheat Jul 28 '13 at 02:24
  • Please help me if you are a capable enough – m1k Jul 28 '13 at 02:30
  • 3
    Welcome to Stack Overflow. Please read the [About] page soon. Note that you will generally get a friendlier reception if you show what you've tried, or explain what you've thought about using and why it won't work. Also, urgency is not recognized as a reason for demanding help here. Claiming urgency is more likely to get your question ignored than answered. – Jonathan Leffler Jul 28 '13 at 02:45

1 Answers1

0

Another solution with fold :

echo "google" | fold -w1
Bertrand Martel
  • 42,756
  • 16
  • 135
  • 159