fork download
  1. #!/bin/bash
  2. s='abcd 10001.'
  3. perl -pe 's/(?!^).(?!$)/$&\n$&/g' <<< "$s"
Success #stdin #stdout 0s 4988KB
stdin
Standard input is empty
stdout
ab
bc
cd
d 
 1
10
00
00
01
1.