Move under www to ease rsync
This commit is contained in:
25
www/eps/hpr2060/hpr2060_reverse_characters_debug.sed
Executable file
25
www/eps/hpr2060/hpr2060_reverse_characters_debug.sed
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sed -f
|
||||
|
||||
# reverse_characters_debug.sed
|
||||
#
|
||||
# A version which prints what it's doing to help understand the process
|
||||
|
||||
/../! b
|
||||
|
||||
# Reverse a line. Begin embedding the line between two newlines
|
||||
s/^.*$/\n&\n/
|
||||
|
||||
# List the line to see what the command above did to it
|
||||
l
|
||||
|
||||
# Move first character at the end. The regexp matches until
|
||||
# there are zero or one characters between the markers
|
||||
tx
|
||||
:x
|
||||
s/\(\n.\)\(.*\)\(.\n\)/\3\2\1/
|
||||
# List the result of each loop iteration
|
||||
l
|
||||
tx
|
||||
|
||||
# Remove the newline markers
|
||||
s/\n//g
|
||||
Reference in New Issue
Block a user