trim_copyright_notice_sh.awk 240 B

1234567891011121314151617181920
  1. {
  2. if (show > 1)
  3. print;
  4. else if (show == 1 && NF > 0 && $1 != "#")
  5. {
  6. print;
  7. show = 2;
  8. }
  9. if (!show)
  10. {
  11. if ($1 == "#!/usr/bin/env")
  12. show = 1;
  13. else if (NF > 0)
  14. {
  15. show = 3;
  16. print;
  17. }
  18. }
  19. }