fork download
  1. #!/bin/bash
  2.  
  3. sed -r ":
  4. s/( 0)+ /../
  5. s/\w+..\w+/{&}/
  6. s/.*/bash -c 'echo &'/e
  7. / 0/b"
  8.  
Success #stdin #stdout 0s 5076KB
stdin
1 0 0 0 5 6 0 4 0 0 1
7 6 0 0 3 0 0 0 7 0 5
1 0 3 0 5 0 3 0 5 0 7
14 0 0 0 0 0 0 0 0 23
stdout
1 2 3 4 5 6 5 4 3 2 1
7 6 5 4 3 4 5 6 7 6 5
1 2 3 4 5 4 3 4 5 6 7
14 15 16 17 18 19 20 21 22 23