11 lines
498 B
Bash
11 lines
498 B
Bash
#!/cmd/rc
|
|
|
|
# sed -n \
|
|
# -e '/#{{/{x; /^$/{x;b}; s/''/''''/g; s/\$[$a-zA-Z0-9()#"]\+[\^]\?/''&''/g; s/^\n/echo ''/ ; s/$/''/; p; x; h; b}' \
|
|
# -e H \
|
|
# -e '/#}}/{s/#}}//; x; s/#{{//; s/#}}//; p; g}' \
|
|
# -e '${x; /^$/{b}; /#}}/!{s/''/''''/g; s/\$[$a-zA-Z0-9()#"]\+[\^]\?/''&''/g; s/^\n/echo ''/ ; s/$/''/; p}}' \
|
|
# | rc
|
|
|
|
sed '/^$/{s//echo/; b}; /^#! /{s/#! //g; b}; /^#! /!{s/''/''''/g; s/\$\(#\|"\)\?[$a-zA-Z0-9_]\+\(([$a-zA-Z0-9#_]\+)\)\?[\^]\?/''&''/g; s/^/echo ''/ ; s/$/''/; b}'
|