s243a

sed_loop_prg

Jan 15th, 2020
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #!$PREFIX/sed
  2. /$%{aprintd}%: / {
  3. s/$%{aprintd}%: //
  4. H
  5. g
  6. p
  7. d}
  8.  
  9. /$%{printd}%: / {
  10. s/$%{printd}%: //
  11. p
  12. d}
  13. /$%{printh}%: / {
  14. h
  15. p
  16. d}
  17. /$%{hold%}: / {h;d}
  18. /$%{delete}%:/ {s/.*//;x;}
  19. /$%{parse_squote_oh}%: '/{
  20. s/$%{parse_squote}%://
  21. s/' \('\([^']\|\\)*(.*))//$%{hold%}: \1\/
  22. h;d
  23. /$%{parse_squote_oh}%: '/ {
  24. s/$%{parse_squote}%://
  25. s/\('\([^']\|\\)*(.*))//$%{hold%}: \1\/
  26. h;d}
  27. /$%{parse_squote_oPD}%: {
  28. s/$%{parse_squote}%://
  29. s/\(q\([^']\|\\)*(.*))//\n%{parse_squote}%: \1\/
  30. P;D}
Advertisement
Add Comment
Please, Sign In to add comment