Differences between revisions 3 and 4
Revision 3 as of 2008-11-22 14:08:36
Size: 370
Editor: localhost
Comment: converted to 1.6 markup
Revision 4 as of 2009-12-29 17:16:14
Size: 393
Editor: MatthiasPopp
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:

----
CategoryShell

How can I insert a blank character after each character?

    sed 's/./& /g'

Example:

    $ echo "testing" | sed 's/./& /g'
    t e s t i n g

For more examples of sed 1-liners, see sed 1-liners or the sed FAQ.


CategoryShell

BashFAQ/003 (last edited 2018-01-19 22:00:52 by GreyCat)