Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sed -f
- # see http://theunixshell.blogspot.de/2014/05/inserting-lines-in-file-using-perl.html
- # write line unchanged
- p
- # change to hold space
- x
- # initialize replacement sequence if it wasn't already
- s/^$/5\"/
- # append to original line
- H
- # cycle through numbers for next iteration
- y/567/675/
- # change to appended line
- x
- # remove old line end
- s/.\"\n//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement